<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
  <link href='https://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css' /><title>Release Notes for MongoDB 4.0 &mdash; MongoDB Manual</title><link rel="shortcut icon" href="https://media.mongodb.org/favicon.ico" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="robots" content="index" />

  <meta name="release" content="4.2.5"/>
  <meta name="version" content="4.2"/>
  <meta name="DC.Source" content="https://github.com/mongodb/docs/blob/v4.2/source/release-notes/4.0.txt"/>
  <meta property="og:image" content="http://s3.amazonaws.com/info-mongodb-com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
  <meta property="og:image:secure_url" content="https://webassets.mongodb.com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
      <link rel="canonical" href="https://docs.mongodb.com/manual/release-notes/4.0" />
  
   <link rel="stylesheet" href="../_static/mongodb-docs.css" type="text/css" />
   <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
   <link rel="stylesheet" href="../_static/css/navbar.min.css" type="text/css" />
    
    <script type="text/javascript" src="../_static/lib/jquery.min.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/lib/bootstrap.js"></script>
    <script type="text/javascript" src="../_static/lib/jquery.cookie.js"></script>
    <script type="text/javascript" src="../_static/controller.js"></script>
      <link rel="search" type="application/opensearchdescription+xml" href="https://docs.mongodb.com/osd.xml" title="MongoDB Help"/>
<link rel="author" title="About these documents" href="../about.html" />
<!-- <link rel="index" title="Index" href="../genindex.html" /> -->
<link rel="search" title="Search" href="../search.html" />
<link rel="top" title="MongoDB Manual" href="../index.html" />
<link rel="up" title="Release Notes" href="../release-notes.html" />
<link rel="next" title="Compatibility Changes in MongoDB 4.0" href="4.0-compatibility.html" />
<link rel="prev" title="4.2 Changelog" href="4.2-changelog.html" /><script type='text/javascript'>
   var gptadslots=[];
   var googletag = googletag || {};
   googletag.cmd = googletag.cmd || [];
   (function(){ var gads = document.createElement('script');
      gads.async = true; gads.type = 'text/javascript';
      var useSSL = 'https:' == document.location.protocol;
      gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
      var node = document.getElementsByTagName('script')[0];
      node.parentNode.insertBefore(gads, node);
   })();
</script>

<script type="text/javascript">
   googletag.cmd.push(function() {

      var pathname = location.href;
      
      if ( (pathname.indexOf("auth") >= 0) || (pathname.indexOf("security") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/security', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if ( (pathname.indexOf("crud") >= 0) ||  (pathname.indexOf("query") >= 0) || (pathname.indexOf("insert") >= 0) || (pathname.indexOf("update") >= 0) || (pathname.indexOf("remove") >= 0) || (pathname.indexOf("delete") >= 0) || (pathname.indexOf("aggregation") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/crud', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("shard") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/sharding', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("replica") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/replication', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("model") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/data-modeling', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("administration") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/support', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("install-mongodb-on-windows") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/install-mongodb-on-windows', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("tutorial/getting-started") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/docs_server_gettingstarted', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else {
         //Adslot 1 declaration
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      }
      googletag.pubads().enableSingleRequest();
      googletag.pubads().enableAsyncRendering();
      googletag.enableServices();
   });
</script></head>
<body data-project="manual" data-project-title="MongoDB Manual" data-branch="v4.2" data-enable-marian=1>
  <!-- Google Tag Manager -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-JQHP"
                    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push(
     {'gtm.start': new Date().getTime(),event:'gtm.js'}
   );var f=d.getElementsByTagName(s)[0],
   j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
   '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
   })(window,document,'script','dataLayer','GTM-JQHP');</script>
  <!-- End Google Tag Manager -->
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server","active": true},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud"},{"url": "https://docs.mongodb.com/tools/","text": "Tools"},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>
      <script>
        window.googleSearchCx = "017213726194841070573:WMX6838984"
	window.googleSearchPlaceholder = "Search Documentation"
        window.googleSearchResultsUrl = "http://docs.mongodb.com/manual/search/"
      </script>
    <script src="../_static/navbar.min.js"></script>
  

  <div class="content" >

   <div id="left-column">
         <aside id="sidebar" class="sidebar">
             
  <div class="sphinxsidebar" id="sphinxsidebar">
    <div id="sphinxsidebarwrapper" class="sphinxsidebarwrapper"><a href="javascript:void(0)" class="closeNav" id="closeNav">Close &times;</a>


<h3>
  <a class="index-link" href="../index.html">MongoDB Manual</a>
</h3>


    <div class="btn-group version-sidebar">
      <button type="button" class="version-button dropdown-toggle" data-toggle="dropdown">
        
        
        Version 4.2 (current)<span class="caret"></span>
      </button>
      <ul class="dropdown-menu" role="menu">
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="master">
              
              Version 4.4 (upcoming)
            </a>
          </li>
        
          
          <li class="active">
          
            <a href="#" data-path="manual">
              
              Version 4.2 (current)
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v4.0">
              
              Version 4.0
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.6">
              
              Version 3.6
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.4">
              
              Version 3.4
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.2">
              
              Version 3.2
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.0">
              
              Version 3.0
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.6">
              
              Version 2.6
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.4">
              
              Version 2.4
            </a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.2">
              
              Version 2.2
            </a>
          </li>
        
      </ul>
    </div>


<ul class="current"><li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a><ul><li class="toctree-l2"><a class="reference internal" href="../tutorial/getting-started.html">Getting Started</a></li><li class="toctree-l2"><a class="reference external" href="https://docs.atlas.mongodb.com/getting-started/">Create an Atlas Free Tier Cluster</a></li><li class="toctree-l2"><a class="reference internal" href="../core/databases-and-collections.html">Databases and Collections</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/views.html">Views</a></li><li class="toctree-l3"><a class="reference internal" href="../core/materialized-views.html">On-Demand Materialized Views</a></li><li class="toctree-l3"><a class="reference internal" href="../core/capped-collections.html">Capped Collections</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/document.html">Documents</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/bson-types.html">BSON Types</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/bson-type-comparison-order.html">Comparison/Sort Order</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/mongodb-extended-json.html">MongoDB Extended JSON (v2)</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/mongodb-extended-json-v1.html">MongoDB Extended JSON (v1)</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a><ul><li class="toctree-l2"><a class="reference internal" href="../administration/install-community.html">Install MongoDB Community Edition</a><ul><li class="toctree-l3"><a class="reference internal" href="../administration/install-on-linux.html">Install on Linux</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-on-red-hat.html">Install on Red Hat</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-on-red-hat-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-on-ubuntu.html">Install on Ubuntu</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-on-ubuntu-tarball.html">Install using .tgz Tarball</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/installation-ubuntu-community-troubleshooting.html">Troubleshoot Ubuntu Installation</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-on-debian.html">Install on Debian</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-on-debian-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-on-suse.html">Install on SUSE</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-on-suse-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-on-amazon.html">Install on Amazon</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-on-amazon-tarball.html">Install using .tgz Tarball</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/install-mongodb-on-os-x.html">Install on macOS</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-on-os-x-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/install-mongodb-on-windows.html">Install on Windows</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-on-windows-unattended.html">Install using msiexec.exe</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/install-enterprise.html">Install MongoDB Enterprise</a><ul><li class="toctree-l3"><a class="reference internal" href="../administration/install-enterprise-linux.html">Install on Linux</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-red-hat.html">Install on Red Hat</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-red-hat-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-ubuntu.html">Install on Ubuntu</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-ubuntu-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-debian.html">Install on Debian</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-debian-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-suse.html">Install on SUSE</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-suse-tarball.html">Install using .tgz Tarball</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-amazon.html">Install on Amazon</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-amazon-tarball.html">Install using .tgz Tarball</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-os-x.html">Install on macOS</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-windows.html">Install on Windows</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-on-windows-unattended.html">Install using msiexec.exe</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/install-mongodb-enterprise-with-docker.html">Install with Docker</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/upgrade-community-to-enterprise.html">Upgrade MongoDB Community to MongoDB Enterprise</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/upgrade-to-enterprise-standalone.html">Upgrade to MongoDB Enterprise (Standalone)</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/upgrade-to-enterprise-replica-set.html">Upgrade to MongoDB Enterprise (Replica Set)</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/upgrade-to-enterprise-sharded-cluster.html">Upgrade to MongoDB Enterprise (Sharded Cluster)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/verify-mongodb-packages.html">Verify Integrity of MongoDB Packages</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../mongo.html">The <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a><ul><li class="toctree-l2"><a class="reference internal" href="../tutorial/configure-mongo-shell.html">Configure the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/access-mongo-shell-help.html">Access the <code class="docutils literal"><span class="pre">mongo</span></code> Shell Help</a></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/write-scripts-for-the-mongo-shell.html">Write Scripts for the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../core/shell-types.html">Data Types in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/mongo-shell.html"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Quick Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../crud.html">MongoDB CRUD Operations</a><ul><li class="toctree-l2"><a class="reference internal" href="../tutorial/insert-documents.html">Insert Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/insert-methods.html">Insert Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/query-documents.html">Query Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/query-embedded-documents.html">Query on Embedded/Nested Documents</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/query-arrays.html">Query an Array</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/query-array-of-documents.html">Query an Array of Embedded Documents</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/project-fields-from-query-results.html">Project Fields to Return from Query</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/query-for-null-fields.html">Query for Null or Missing Fields</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/iterate-a-cursor.html">Iterate a Cursor in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/update-documents.html">Update Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/update-documents-with-aggregation-pipeline.html">Updates with Aggregation Pipeline</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/update-methods.html">Update Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/remove-documents.html">Delete Documents</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/delete-methods.html">Delete Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/bulk-write-operations.html">Bulk Write Operations</a></li><li class="toctree-l2"><a class="reference internal" href="../core/retryable-writes.html">Retryable Writes</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/sql-comparison.html">SQL to MongoDB Mapping Chart</a></li><li class="toctree-l2"><a class="reference internal" href="../text-search.html">Text Search</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/link-text-indexes.html">Text Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../core/text-search-operators.html">Text Search Operators</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/text-search-in-aggregation.html">Text Search in the Aggregation Pipeline</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/text-search-languages.html">Text Search Languages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../geospatial-queries.html">Geospatial Queries</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/geospatial-tutorial.html">Find Restaurants with Geospatial Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/geojson.html">GeoJSON Objects</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/read-concern.html">Read Isolation (Read Concern)</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/read-concern-local.html">Read Concern <code class="docutils literal"><span class="pre">&quot;local&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/read-concern-available.html">Read Concern <code class="docutils literal"><span class="pre">&quot;available&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/read-concern-majority.html">Read Concern <code class="docutils literal"><span class="pre">&quot;majority&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/read-concern-linearizable.html">Read Concern <code class="docutils literal"><span class="pre">&quot;linearizable&quot;</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/read-concern-snapshot.html">Read Concern <code class="docutils literal"><span class="pre">&quot;snapshot&quot;</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/write-concern.html">Write Acknowledgement (Write Concern)</a></li><li class="toctree-l2"><a class="reference internal" href="../core/crud.html">MongoDB CRUD Concepts</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/write-operations-atomicity.html">Atomicity and Transactions</a></li><li class="toctree-l3"><a class="reference internal" href="../core/read-isolation-consistency-recency.html">Read Isolation, Consistency, and Recency</a><ul><li class="toctree-l4"><a class="reference internal" href="../core/causal-consistency-read-write-concerns.html">Causal Consistency and Read and Write Concerns</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/distributed-queries.html">Distributed Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/perform-findAndModify-linearizable-reads.html">Linearizable Reads via <code class="docutils literal"><span class="pre">findAndModify</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../core/query-plans.html">Query Plans</a></li><li class="toctree-l3"><a class="reference internal" href="../core/query-optimization.html">Query Optimization</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/evaluate-operation-performance.html">Evaluate Performance of Current Operations</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/optimize-query-performance-with-indexes-and-projections.html">Optimize Query Performance</a></li><li class="toctree-l4"><a class="reference internal" href="../core/write-performance.html">Write Operation Performance</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/explain-results.html">Explain Results</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/analyze-query-plan.html">Analyze Query Performance</a></li><li class="toctree-l3"><a class="reference internal" href="../core/tailable-cursors.html">Tailable Cursors</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../aggregation.html">Aggregation</a><ul><li class="toctree-l2"><a class="reference internal" href="../core/aggregation-pipeline.html">Aggregation Pipeline</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/aggregation-pipeline-optimization.html">Aggregation Pipeline Optimization</a></li><li class="toctree-l3"><a class="reference internal" href="../core/aggregation-pipeline-limits.html">Aggregation Pipeline Limits</a></li><li class="toctree-l3"><a class="reference internal" href="../core/aggregation-pipeline-sharded-collections.html">Aggregation Pipeline and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/aggregation-zip-code-data-set.html">Example with ZIP Code Data</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/aggregation-with-user-preference-data.html">Example with User Preference Data</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/map-reduce.html">Map-Reduce</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/map-reduce-sharded-collections.html">Map-Reduce and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="../core/map-reduce-concurrency.html">Map-Reduce Concurrency</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/map-reduce-examples.html">Map-Reduce Examples</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/perform-incremental-map-reduce.html">Perform Incremental Map-Reduce</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/troubleshoot-map-function.html">Troubleshoot the Map Function</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/troubleshoot-reduce-function.html">Troubleshoot the Reduce Function</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/aggregation.html">Aggregation Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../meta/aggregation-quick-reference.html">Aggregation Pipeline Quick Reference</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/operator/aggregation/interface.html">Aggregation Commands</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/aggregation-commands-comparison.html">Aggregation Commands Comparison</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/aggregation-variables.html">Variables in Aggregation Expressions</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/sql-aggregation-comparison.html">SQL to Aggregation Mapping Chart</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../data-modeling.html">Data Models</a><ul><li class="toctree-l2"><a class="reference internal" href="../core/data-modeling-introduction.html">Data Modeling Introduction</a></li><li class="toctree-l2"><a class="reference internal" href="../core/schema-validation.html">Schema Validation</a></li><li class="toctree-l2"><a class="reference internal" href="../core/data-models.html">Data Modeling Concepts</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/data-model-design.html">Data Model Design</a></li><li class="toctree-l3"><a class="reference internal" href="../core/data-model-operations.html">Operational Factors and Data Models</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../applications/data-models.html">Data Model Examples and Patterns</a><ul><li class="toctree-l3"><a class="reference internal" href="../applications/data-models-relationships.html">Model Relationships Between Documents</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-embedded-one-to-one-relationships-between-documents.html">Model One-to-One Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-embedded-one-to-many-relationships-between-documents.html">Model One-to-Many Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-referenced-one-to-many-relationships-between-documents.html">Model One-to-Many Relationships with Document References</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../applications/data-models-tree-structures.html">Model Tree Structures</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-tree-structures-with-parent-references.html">Model Tree Structures with Parent References</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-tree-structures-with-child-references.html">Model Tree Structures with Child References</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-tree-structures-with-ancestors-array.html">Model Tree Structures with an Array of Ancestors</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-tree-structures-with-materialized-paths.html">Model Tree Structures with Materialized Paths</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-tree-structures-with-nested-sets.html">Model Tree Structures with Nested Sets</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../applications/data-models-applications.html">Model Specific Application Contexts</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-data-for-atomic-operations.html">Model Data for Atomic Operations</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-data-for-keyword-search.html">Model Data to Support Keyword Search</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-data-for-schema-versioning.html">Model Data for Schema Versioning</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-monetary-data.html">Model Monetary Data</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-time-data.html">Model Time Data</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/model-computed-data.html">Model Computed Data</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/data-models.html">Data Model Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/database-references.html">Database References</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../core/transactions.html">Transactions</a><ul><li class="toctree-l2"><a class="reference internal" href="../core/transactions-in-applications.html">Drivers API</a></li><li class="toctree-l2"><a class="reference internal" href="../core/transactions-production-consideration.html">Production Considerations</a></li><li class="toctree-l2"><a class="reference internal" href="../core/transactions-sharded-clusters.html">Production Considerations (Sharded Clusters)</a></li><li class="toctree-l2"><a class="reference internal" href="../core/transactions-operations.html">Transactions and Operations</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../indexes.html">Indexes</a><ul><li class="toctree-l2"><a class="reference internal" href="../core/index-single.html">Single Field Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../core/index-compound.html">Compound Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../core/index-multikey.html">Multikey Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/multikey-index-bounds.html">Multikey Index Bounds</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/index-text.html">Text Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/specify-language-for-text-index.html">Specify a Language for Text Index</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/avoid-text-index-name-limit.html">Specify Name for <code class="docutils literal"><span class="pre">text</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/control-results-of-text-search.html">Control Search Results with Weights</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/limit-number-of-items-scanned-for-text-search.html">Limit the Number of Entries Scanned</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/index-wildcard.html">Wildcard Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/index-wildcard-restrictions.html">Wildcard Index Restrictions</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/2dsphere.html"><code class="docutils literal"><span class="pre">2dsphere</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/query-a-2dsphere-index.html">Query a <code class="docutils literal"><span class="pre">2dsphere</span></code> Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/2d.html"><code class="docutils literal"><span class="pre">2d</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/build-a-2d-index.html">Create a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/query-a-2d-index.html">Query a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="../core/geospatial-indexes.html"><code class="docutils literal"><span class="pre">2d</span></code> Index Internals</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes.html">Calculate Distance Using Spherical Geometry</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/geohaystack.html"><code class="docutils literal"><span class="pre">geoHaystack</span></code> Indexes</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/build-a-geohaystack-index.html">Create a Haystack Index</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/query-a-geohaystack-index.html">Query a Haystack Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/index-hashed.html">Hashed Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../core/index-properties.html">Index Properties</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/index-ttl.html">TTL Indexes</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/expire-data.html">Expire Data from Collections by Setting TTL</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/index-unique.html">Unique Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../core/index-partial.html">Partial Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../core/index-case-insensitive.html">Case Insensitive Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="../core/index-sparse.html">Sparse Indexes</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/index-creation.html">Index Builds on Populated Collections</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/build-indexes-on-replica-sets.html">Build Indexes on Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/build-indexes-on-sharded-clusters.html">Build Indexes on Sharded Clusters</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/index-intersection.html">Index Intersection</a></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/manage-indexes.html">Manage Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/measure-index-use.html">Measure Index Use</a></li><li class="toctree-l2"><a class="reference internal" href="../applications/indexes.html">Indexing Strategies</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/create-indexes-to-support-queries.html">Create Indexes to Support Your Queries</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/sort-results-with-indexes.html">Use Indexes to Sort Query Results</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/ensure-indexes-fit-ram.html">Ensure Indexes Fit in RAM</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/create-queries-that-ensure-selectivity.html">Create Queries that Ensure Selectivity</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/indexes.html">Indexing Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../security.html">Security</a><ul><li class="toctree-l2"><a class="reference internal" href="../administration/security-checklist.html">Security Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/enable-authentication.html">Enable Access Control</a></li><li class="toctree-l2"><a class="reference internal" href="../core/authentication.html">Authentication</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/security-users.html">Users</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/create-users.html">Add Users</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/authentication-mechanisms.html">Authentication Mechanisms</a><ul><li class="toctree-l4"><a class="reference internal" href="../core/security-scram.html">SCRAM</a></li><li class="toctree-l4"><a class="reference internal" href="../core/security-x.509.html">x.509</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/configure-x509-client-authentication.html">Use x.509 Certificates to Authenticate Clients</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/authentication-mechanisms-enterprise.html">Enterprise Authentication Mechanisms</a><ul><li class="toctree-l4"><a class="reference internal" href="../core/kerberos.html">Kerberos Authentication</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/control-access-to-mongodb-with-kerberos-authentication.html">Configure MongoDB with Kerberos Authentication on Linux</a></li><li class="toctree-l5"><a class="reference internal" href="../tutorial/control-access-to-mongodb-windows-with-kerberos-authentication.html">Configure MongoDB with Kerberos Authentication on Windows</a></li><li class="toctree-l5"><a class="reference internal" href="../tutorial/troubleshoot-kerberos.html">Troubleshoot Kerberos Authentication</a></li><li class="toctree-l5"><a class="reference internal" href="../tutorial/kerberos-auth-activedirectory-authz.html">Configure MongoDB with Kerberos Authentication and Active Directory Authorization</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../core/security-ldap.html">LDAP Proxy Authentication</a><ul><li class="toctree-l5"><a class="reference internal" href="../tutorial/configure-ldap-sasl-activedirectory.html">Authenticate Using SASL and LDAP with ActiveDirectory</a></li><li class="toctree-l5"><a class="reference internal" href="../tutorial/configure-ldap-sasl-openldap.html">Authenticate Using SASL and LDAP with OpenLDAP</a></li><li class="toctree-l5"><a class="reference internal" href="../tutorial/authenticate-nativeldap-activedirectory.html">Authenticate and Authorize Users Using Active Directory via Native LDAP</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../core/security-ldap-external.html">LDAP Authorization</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/security-internal-authentication.html">Internal/Membership Authentication</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/deploy-replica-set-with-keyfile-access-control.html">Deploy Replica Set With Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/enforce-keyfile-access-control-in-existing-replica-set.html">Update Replica Set to Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/enforce-keyfile-access-control-in-existing-replica-set-without-downtime.html">Update Replica Set to Keyfile Authentication (No Downtime)</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/rotate-key-replica-set.html">Rotate Keys for Replica Sets</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/deploy-sharded-cluster-with-keyfile-access-control.html">Deploy Sharded Cluster with Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster.html">Update Sharded Cluster to Keyfile Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime.html">Update Sharded Cluster to Keyfile Authentication (No Downtime)</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/rotate-key-sharded-cluster.html">Rotate Keys for Sharded Clusters</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/configure-x509-member-authentication.html">Use x.509 Certificate for Membership Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/upgrade-keyfile-to-x509.html">Upgrade from Keyfile Authentication to x.509 Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/rotate-x509-membership-certificates.html">Rolling Update of x.509 Cluster Certificates that Contain New DN</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/authorization.html">Role-Based Access Control</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/built-in-roles.html">Built-In Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../core/security-user-defined-roles.html">User-Defined Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-users-and-roles.html">Manage Users and Roles</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/change-own-password-and-custom-data.html">Change Your Password and Custom Data</a></li><li class="toctree-l3"><a class="reference internal" href="../core/collection-level-access-control.html">Collection-Level Access Control</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/security-transport-encryption.html">TLS/SSL (Transport Encryption)</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-ssl.html">Configure <code class="docutils literal"><span class="pre">mongod</span></code> and <code class="docutils literal"><span class="pre">mongos</span></code> for TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-ssl-clients.html">TLS/SSL Configuration for Clients</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/upgrade-cluster-to-ssl.html">Upgrade a Cluster to Use TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-fips.html">Configure MongoDB for FIPS</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/security-encryption-at-rest.html">Encryption at Rest</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-encryption.html">Configure Encryption</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/rotate-encryption-key.html">Rotate Encryption Keys</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/security-client-side-encryption.html">Client-Side Field Level Encryption</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/security-automatic-client-side-encryption.html">Automatic Client-Side Field Level Encryption</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/security-client-side-automatic-json-schema.html">Automatic Encryption Rules</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/security-client-side-query-aggregation-support.html">Read/Write Support with Automatic Field Level Encryption</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/security-client-side-encryption-appendix.html">Appendix</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/security-explicit-client-side-encryption.html">Explicit (Manual) Client-Side Field Level Encryption</a></li><li class="toctree-l3"><a class="reference internal" href="../core/security-client-side-encryption-key-management.html">Master Key and Data Encryption Key Management</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/manage-client-side-encryption-data-keys.html">Manage Data Encryption Keys</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/security-client-side-encryption-limitations.html">Limitations</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/auditing.html">Auditing</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-auditing.html">Configure Auditing</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-audit-filters.html">Configure Audit Filters</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/audit-message.html">System Event Audit Messages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/security-hardening.html">Network and Configuration Hardening</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/security-mongodb-configuration.html">IP Binding</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-linux-iptables-firewall.html">Configure Linux <code class="docutils literal"><span class="pre">iptables</span></code> Firewall for MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-windows-netsh-firewall.html">Configure Windows <code class="docutils literal"><span class="pre">netsh</span></code> Firewall for MongoDB</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/implement-field-level-redaction.html">Implement Field Level Redaction</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/security.html">Security Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/system-roles-collection.html"><code class="docutils literal"><span class="pre">system.roles</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/system-users-collection.html"><code class="docutils literal"><span class="pre">system.users</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/resource-document.html">Resource Document</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/privilege-actions.html">Privilege Actions</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/create-a-vulnerability-report.html">Create a Vulnerability Report</a></li><li class="toctree-l2"><a class="reference internal" href="../appendix/security.html">Appendix</a><ul><li class="toctree-l3"><a class="reference internal" href="../appendix/security/appendixA-openssl-ca.html">Appendix A - OpenSSL CA Certificate for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="../appendix/security/appendixB-openssl-server.html">Appendix B - OpenSSL Server Certificates for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="../appendix/security/appendixC-openssl-client.html">Appendix C - OpenSSL Client Certificates for Testing</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../changeStreams.html">Change Streams</a><ul><li class="toctree-l2"><a class="reference internal" href="../administration/change-streams-production-recommendations.html">Change Streams Production Recommendations</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/change-events.html">Change Events</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../replication.html">Replication</a><ul><li class="toctree-l2"><a class="reference internal" href="../core/replica-set-members.html">Replica Set Members</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-primary.html">Replica Set Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-secondary.html">Replica Set Secondary Members</a><ul><li class="toctree-l4"><a class="reference internal" href="../core/replica-set-priority-0-member.html">Priority 0 Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="../core/replica-set-hidden-member.html">Hidden Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="../core/replica-set-delayed-member.html">Delayed Replica Set Members</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-arbiter.html">Replica Set Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/replica-set-oplog.html">Replica Set Oplog</a></li><li class="toctree-l2"><a class="reference internal" href="../core/replica-set-sync.html">Replica Set Data Synchronization</a></li><li class="toctree-l2"><a class="reference internal" href="../core/replica-set-architectures.html">Replica Set Deployment Architectures</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-architecture-three-members.html">Three Member Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-architecture-geographically-distributed.html">Replica Sets Distributed Across Two or More Data Centers</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/replica-set-high-availability.html">Replica Set High Availability</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-elections.html">Replica Set Elections</a></li><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-rollbacks.html">Rollbacks During Replica Set Failover</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../applications/replication.html">Replica Set Read and Write Semantics</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/replica-set-write-concern.html">Write Concern for Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../core/read-preference.html">Read Preference</a><ul><li class="toctree-l4"><a class="reference internal" href="../core/read-preference-tags.html">Tag Sets</a></li><li class="toctree-l4"><a class="reference internal" href="../core/read-preference-staleness.html">maxStalenessSeconds</a></li><li class="toctree-l4"><a class="reference internal" href="../core/read-preference-use-cases.html">Read Preference Use Cases</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/read-preference-mechanics.html">Server Selection Algorithm</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/replica-set-deployment.html">Replica Set Deployment Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/deploy-replica-set.html">Deploy a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/deploy-replica-set-for-testing.html">Deploy a Replica Set for Testing and Development</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/deploy-geographically-distributed-replica-set.html">Deploy a Geographically Redundant Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/add-replica-set-arbiter.html">Add an Arbiter to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/convert-standalone-to-replica-set.html">Convert a Standalone to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/expand-replica-set.html">Add Members to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/remove-replica-set-member.html">Remove Members from Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/replace-replica-set-member.html">Replace a Replica Set Member</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/replica-set-member-configuration.html">Member Configuration Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/adjust-replica-set-member-priority.html">Adjust Priority for Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-secondary-only-replica-set-member.html">Prevent Secondary from Becoming Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-a-hidden-replica-set-member.html">Configure a Hidden Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-a-delayed-replica-set-member.html">Configure a Delayed Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-a-non-voting-replica-set-member.html">Configure Non-Voting Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/convert-secondary-into-arbiter.html">Convert a Secondary to an Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/replica-set-maintenance.html">Replica Set Maintenance Tutorials</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/change-oplog-size.html">Change the Size of the Oplog</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/perform-maintence-on-replica-set-members.html">Perform Maintenance on Replica Set Members</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/force-member-to-be-primary.html">Force a Member to Become Primary</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/resync-replica-set-member.html">Resync a Member of a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-replica-set-tag-sets.html">Configure Replica Set Tag Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/reconfigure-replica-set-with-unavailable-members.html">Reconfigure a Replica Set with Unavailable Members</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-chained-replication.html">Manage Chained Replication</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/change-hostnames-in-a-replica-set.html">Change Hostnames in a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/configure-replica-set-secondary-sync-target.html">Configure a Secondary’s Sync Target</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/replication.html">Replication Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/replica-configuration.html">Replica Set Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/replica-set-protocol-versions.html">Replica Set Protocol Version</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/troubleshoot-replica-sets.html">Troubleshoot Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/local-database.html">The <code class="docutils literal"><span class="pre">local</span></code> Database</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/replica-states.html">Replica Set Member States</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../sharding.html">Sharding</a><ul><li class="toctree-l2"><a class="reference internal" href="../core/sharded-cluster-components.html">Sharded Cluster Components</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/sharded-cluster-shards.html">Shards</a></li><li class="toctree-l3"><a class="reference internal" href="../core/sharded-cluster-config-servers.html">Config Servers (metadata)</a></li><li class="toctree-l3"><a class="reference internal" href="../core/sharded-cluster-query-router.html">Router (mongos)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/sharding-shard-key.html">Shard Keys</a></li><li class="toctree-l2"><a class="reference internal" href="../core/hashed-sharding.html">Hashed Sharding</a></li><li class="toctree-l2"><a class="reference internal" href="../core/ranged-sharding.html">Ranged Sharding</a></li><li class="toctree-l2"><a class="reference internal" href="../tutorial/deploy-shard-cluster.html">Deploy a Sharded Cluster</a></li><li class="toctree-l2"><a class="reference internal" href="../core/zone-sharding.html">Zones</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/sharding-segmenting-data-by-location.html">Segmenting Data by Location</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/sharding-tiered-hardware-for-varying-slas.html">Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/sharding-segmenting-shards.html">Segmenting Data by Application or Customer</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/sharding-high-availability-writes.html">Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/sharding-data-partitioning.html">Data Partitioning with Chunks</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/create-chunks-in-sharded-cluster.html">Create Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/split-chunks-in-sharded-cluster.html">Split Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/merge-chunks-in-sharded-cluster.html">Merge Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/modify-chunk-size-in-sharded-cluster.html">Modify Chunk Size in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/sharding-balancer-administration.html">Balancer</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-sharded-cluster-balancer.html">Manage Sharded Cluster Balancer</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/migrate-chunks-in-sharded-cluster.html">Migrate Chunks in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/sharded-cluster-administration.html">Administration</a><ul><li class="toctree-l3"><a class="reference internal" href="../administration/sharded-cluster-config-servers.html">Config Server Administration</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/replace-config-server.html">Replace a Config Server</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/view-sharded-cluster-configuration.html">View Cluster Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/restart-sharded-cluster.html">Restart a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/migrate-sharded-cluster-to-new-hardware.html">Migrate a Sharded Cluster to Different Hardware</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/add-shards-to-shard-cluster.html">Add Shards to a Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/remove-shards-from-cluster.html">Remove Shards from an Existing Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/clear-jumbo-flag.html">Clear <code class="docutils literal"><span class="pre">jumbo</span></code> Flag</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/backup-sharded-cluster-metadata.html">Back Up Cluster Metadata</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/convert-sharded-cluster-to-replica-set.html">Convert Sharded Cluster to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/convert-replica-set-to-replicated-shard-cluster.html">Convert a Replica Set to a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/convert-shard-standalone-to-shard-replica-set.html">Convert a Shard Standalone to a Shard Replica Set</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/sharding.html">Sharding Reference</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/sharded-cluster-requirements.html">Operational Restrictions</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/troubleshoot-sharded-clusters.html">Troubleshoot Sharded Clusters</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/config-database.html">Config Database</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../administration.html">Administration</a><ul><li class="toctree-l2"><a class="reference internal" href="../administration/production-notes.html">Production Notes</a></li><li class="toctree-l2"><a class="reference internal" href="../administration/production-checklist-operations.html">Operations Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../administration/production-checklist-development.html">Development Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="../administration/analyzing-mongodb-performance.html">Performance</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-the-database-profiler.html">Database Profiler</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/database-profiler.html">Database Profiler Output</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/transparent-huge-pages.html">Disable Transparent Huge Pages (THP)</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/ulimit.html">UNIX <code class="docutils literal"><span class="pre">ulimit</span></code> Settings</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/configuration-and-maintenance.html">Configuration and Maintenance</a><ul><li class="toctree-l3"><a class="reference internal" href="../administration/configuration.html">Run-time Database Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/upgrade-revision.html">Upgrade to the Latest Revision of MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-mongodb-processes.html">Manage <code class="docutils literal"><span class="pre">mongod</span></code> Processes</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/terminate-running-operations.html">Terminate Running Operations</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/rotate-log-files.html">Rotate Log Files</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../data-center-awareness.html">Data Center Awareness</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/workload-isolation.html">Workload Isolation in MongoDB Deployments</a></li><li class="toctree-l3"><a class="reference internal" href="../core/zone-sharding.html">Zones</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/sharding-segmenting-data-by-location.html">Segmenting Data by Location</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/sharding-tiered-hardware-for-varying-slas.html">Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/sharding-segmenting-shards.html">Segmenting Data by Application or Customer</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/sharding-high-availability-writes.html">Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-shard-zone.html">Manage Shard Zones</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/backups.html">MongoDB Backup Methods</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/backup-with-filesystem-snapshots.html">Back Up and Restore with Filesystem Snapshots</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/backup-and-restore-tools.html">Back Up and Restore with MongoDB Tools</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/restore-replica-set-from-backup.html">Restore a Replica Set from MongoDB Backups</a></li><li class="toctree-l3"><a class="reference internal" href="../administration/backup-sharded-clusters.html">Backup and Restore Sharded Clusters</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/backup-sharded-cluster-with-filesystem-snapshots.html">Back Up a Sharded Cluster with File System Snapshots</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/backup-sharded-cluster-with-database-dumps.html">Back Up a Sharded Cluster with Database Dumps</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/schedule-backup-window-for-sharded-clusters.html">Schedule Backup Window for Sharded Clusters</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/restore-sharded-cluster.html">Restore a Sharded Cluster</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/recover-data-following-unexpected-shutdown.html">Recover a Standalone after an Unexpected Shutdown</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../administration/monitoring.html">Monitoring for MongoDB</a><ul><li class="toctree-l3"><a class="reference internal" href="../administration/free-monitoring.html">Free Monitoring</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/monitor-with-snmp.html">Monitor MongoDB With SNMP on Linux</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/monitor-with-snmp-on-windows.html">Monitor MongoDB Windows with SNMP</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/troubleshoot-snmp.html">Troubleshoot SNMP</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../storage.html">Storage</a><ul><li class="toctree-l2"><a class="reference internal" href="../core/storage-engines.html">Storage Engines</a><ul><li class="toctree-l3"><a class="reference internal" href="../core/wiredtiger.html">WiredTiger Storage Engine</a><ul><li class="toctree-l4"><a class="reference internal" href="../tutorial/change-standalone-wiredtiger.html">Change Standalone to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/change-replica-set-wiredtiger.html">Change Replica Set to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="../tutorial/change-sharded-cluster-wiredtiger.html">Change Sharded Cluster to WiredTiger</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../core/inmemory.html">In-Memory Storage Engine</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/journaling.html">Journaling</a><ul><li class="toctree-l3"><a class="reference internal" href="../tutorial/manage-journaling.html">Manage Journaling</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../core/gridfs.html">GridFS</a></li><li class="toctree-l2"><a class="reference internal" href="../faq/storage.html">FAQ: MongoDB Storage</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../faq.html">Frequently Asked Questions</a><ul><li class="toctree-l2"><a class="reference internal" href="../faq/fundamentals.html">FAQ: MongoDB Fundamentals</a></li><li class="toctree-l2"><a class="reference internal" href="../faq/indexes.html">FAQ: Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="../faq/concurrency.html">FAQ: Concurrency</a></li><li class="toctree-l2"><a class="reference internal" href="../faq/sharding.html">FAQ: Sharding with MongoDB</a></li><li class="toctree-l2"><a class="reference internal" href="../faq/replica-sets.html">FAQ: Replication and Replica Sets</a></li><li class="toctree-l2"><a class="reference internal" href="../faq/storage.html">FAQ: MongoDB Storage</a></li><li class="toctree-l2"><a class="reference internal" href="../faq/diagnostics.html">FAQ: MongoDB Diagnostics</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../reference.html">Reference</a><ul><li class="toctree-l2"><a class="reference internal" href="../reference/operator.html">Operators</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/operator/query.html">Query and Projection Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query-comparison.html">Comparison Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/eq.html">$eq</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/gt.html">$gt</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/gte.html">$gte</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/in.html">$in</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/lt.html">$lt</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/lte.html">$lte</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/ne.html">$ne</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/nin.html">$nin</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query-logical.html">Logical Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/and.html">$and</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/not.html">$not</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/nor.html">$nor</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/or.html">$or</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query-element.html">Element Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/exists.html">$exists</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/type.html">$type</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query-evaluation.html">Evaluation Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/expr.html">$expr</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/jsonSchema.html">$jsonSchema</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/mod.html">$mod</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/regex.html">$regex</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/text.html">$text</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/where.html">$where</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query-geospatial.html">Geospatial Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/geoIntersects.html">$geoIntersects</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/geoWithin.html">$geoWithin</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/near.html">$near</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/nearSphere.html">$nearSphere</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/box.html">$box</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/center.html">$center</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/centerSphere.html">$centerSphere</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/geometry.html">$geometry</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/maxDistance.html">$maxDistance</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/minDistance.html">$minDistance</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/polygon.html">$polygon</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/uniqueDocs.html">$uniqueDocs</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query-array.html">Array Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/all.html">$all</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/elemMatch.html">$elemMatch (query)</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/size.html">$size</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query-bitwise.html">Bitwise Query Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/bitsAllClear.html">$bitsAllClear</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/bitsAllSet.html">$bitsAllSet</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/bitsAnyClear.html">$bitsAnyClear</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/query/bitsAnySet.html">$bitsAnySet</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/query/comment.html">$comment</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/projection.html">Projection Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/projection/positional.html">$ (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/projection/elemMatch.html">$elemMatch (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/projection/meta.html">$meta</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/projection/slice.html">$slice (projection)</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/operator/update.html">Update Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/operator/update-field.html">Field Update Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/currentDate.html">$currentDate</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/inc.html">$inc</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/min.html">$min</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/max.html">$max</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/mul.html">$mul</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/rename.html">$rename</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/set.html">$set</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/setOnInsert.html">$setOnInsert</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/unset.html">$unset</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/update-array.html">Array Update Operators</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/positional.html">$ (update)</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/positional-all.html">$[]</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/positional-filtered.html">$[&lt;identifier&gt;]</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/addToSet.html">$addToSet</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/pop.html">$pop</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/pull.html">$pull</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/push.html">$push</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/pullAll.html">$pullAll</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/each.html">$each</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/position.html">$position</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/slice.html">$slice</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/sort.html">$sort</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/update-bitwise.html">Bitwise Update Operator</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/operator/update/bit.html">$bit</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/operator/aggregation-pipeline.html">Aggregation Pipeline Stages</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/addFields.html">$addFields (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/bucket.html">$bucket (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/bucketAuto.html">$bucketAuto (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/collStats.html">$collStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/count.html">$count (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/currentOp.html">$currentOp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/facet.html">$facet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/geoNear.html">$geoNear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/graphLookup.html">$graphLookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/group.html">$group (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/indexStats.html">$indexStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/limit.html">$limit (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/listLocalSessions.html">$listLocalSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/listSessions.html">$listSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/lookup.html">$lookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/match.html">$match (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/merge.html">$merge (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/out.html">$out (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/planCacheStats.html">$planCacheStats</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/project.html">$project (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/redact.html">$redact (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/replaceRoot.html">$replaceRoot (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/replaceWith.html">$replaceWith (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/sample.html">$sample (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/set.html">$set (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/skip.html">$skip (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/sort.html">$sort (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/sortByCount.html">$sortByCount (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/unset.html">$unset (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/unwind.html">$unwind (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/operator/aggregation.html">Aggregation Pipeline Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/abs.html">$abs (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/acos.html">$acos (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/acosh.html">$acosh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/add.html">$add (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/addToSet.html">$addToSet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/allElementsTrue.html">$allElementsTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/and.html">$and (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/anyElementTrue.html">$anyElementTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/arrayElemAt.html">$arrayElemAt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/arrayToObject.html">$arrayToObject (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/asin.html">$asin (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/asinh.html">$asinh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/atan.html">$atan (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/atan2.html">$atan2 (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/atanh.html">$atanh (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/avg.html">$avg (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/ceil.html">$ceil (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/cmp.html">$cmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/concat.html">$concat (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/concatArrays.html">$concatArrays (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/cond.html">$cond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/convert.html">$convert (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/cos.html">$cos (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/dateFromParts.html">$dateFromParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/dateToParts.html">$dateToParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/dateFromString.html">$dateFromString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/dateToString.html">$dateToString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/dayOfMonth.html">$dayOfMonth (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/dayOfWeek.html">$dayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/dayOfYear.html">$dayOfYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/degreesToRadians.html">$degreesToRadians (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/divide.html">$divide (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/eq.html">$eq (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/exp.html">$exp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/filter.html">$filter (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/first.html">$first (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/floor.html">$floor (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/gt.html">$gt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/gte.html">$gte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/hour.html">$hour (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/ifNull.html">$ifNull (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/in.html">$in (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/indexOfArray.html">$indexOfArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/indexOfBytes.html">$indexOfBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/indexOfCP.html">$indexOfCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/isArray.html">$isArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/isoDayOfWeek.html">$isoDayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/isoWeek.html">$isoWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/isoWeekYear.html">$isoWeekYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/last.html">$last (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/let.html">$let (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/literal.html">$literal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/ln.html">$ln (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/log.html">$log (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/log10.html">$log10 (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/lt.html">$lt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/lte.html">$lte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/ltrim.html">$ltrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/map.html">$map (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/max.html">$max (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/mergeObjects.html">$mergeObjects (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/meta.html">$meta (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/min.html">$min (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/millisecond.html">$millisecond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/minute.html">$minute (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/mod.html">$mod (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/month.html">$month (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/multiply.html">$multiply (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/ne.html">$ne (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/not.html">$not (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/objectToArray.html">$objectToArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/or.html">$or (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/pow.html">$pow (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/push.html">$push (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/radiansToDegrees.html">$radiansToDegrees (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/range.html">$range (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/reduce.html">$reduce (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/regexFind.html">$regexFind (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/regexFindAll.html">$regexFindAll (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/regexMatch.html">$regexMatch (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/reverseArray.html">$reverseArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/round.html">$round (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/rtrim.html">$rtrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/second.html">$second (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/setDifference.html">$setDifference (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/setEquals.html">$setEquals (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/setIntersection.html">$setIntersection (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/setIsSubset.html">$setIsSubset (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/setUnion.html">$setUnion (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/size.html">$size (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/sin.html">$sin (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/slice.html">$slice (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/split.html">$split (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/sqrt.html">$sqrt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/stdDevPop.html">$stdDevPop (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/stdDevSamp.html">$stdDevSamp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/strcasecmp.html">$strcasecmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/strLenBytes.html">$strLenBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/strLenCP.html">$strLenCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/substr.html">$substr (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/substrBytes.html">$substrBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/substrCP.html">$substrCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/subtract.html">$subtract (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/sum.html">$sum (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/switch.html">$switch (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/tan.html">$tan (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toBool.html">$toBool (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toDate.html">$toDate (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toDecimal.html">$toDecimal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toDouble.html">$toDouble(aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toInt.html">$toInt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toLong.html">$toLong (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toObjectId.html">$toObjectId (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toString.html">$toString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toLower.html">$toLower (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/toUpper.html">$toUpper (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/trim.html">$trim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/trunc.html">$trunc (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/type.html">$type (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/week.html">$week (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/year.html">$year (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/aggregation/zip.html">$zip (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/operator/query-modifier.html">Query Modifiers</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/comment.html">$comment</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/explain.html">$explain</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/hint.html">$hint</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/max.html">$max</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/maxTimeMS.html">$maxTimeMS</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/min.html">$min</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/orderby.html">$orderby</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/query.html">$query</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/returnKey.html">$returnKey</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/showDiskLoc.html">$showDiskLoc</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/operator/meta/natural.html">$natural</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/command.html">Database Commands</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-aggregation.html">Aggregation Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/aggregate.html">aggregate</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/count.html">count</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/distinct.html">distinct</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/mapReduce.html">mapReduce</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-geospatial.html">Geospatial Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/geoSearch.html">geoSearch</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-crud.html">Query and Write Operation Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/delete.html">delete</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/find.html">find</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/findAndModify.html">findAndModify</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getLastError.html">getLastError</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getMore.html">getMore</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/insert.html">insert</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/resetError.html">resetError</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/update.html">update</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-plan-cache.html">Query Plan Cache Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/planCacheClear.html">planCacheClear</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/planCacheClearFilters.html">planCacheClearFilters</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/planCacheListFilters.html">planCacheListFilters</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/planCacheListPlans.html">planCacheListPlans</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/planCacheListQueryShapes.html">planCacheListQueryShapes</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/planCacheSetFilter.html">planCacheSetFilter</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-authentication.html">Authentication Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/authenticate.html">authenticate</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getnonce.html">getnonce</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/logout.html">logout</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-user-management.html">User Management Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/createUser.html">createUser</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dropAllUsersFromDatabase.html">dropAllUsersFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dropUser.html">dropUser</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/grantRolesToUser.html">grantRolesToUser</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/revokeRolesFromUser.html">revokeRolesFromUser</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/updateUser.html">updateUser</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/usersInfo.html">usersInfo</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-role-management.html">Role Management Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/createRole.html">createRole</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dropRole.html">dropRole</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dropAllRolesFromDatabase.html">dropAllRolesFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/grantPrivilegesToRole.html">grantPrivilegesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/grantRolesToRole.html">grantRolesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/invalidateUserCache.html">invalidateUserCache</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/revokePrivilegesFromRole.html">revokePrivilegesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/revokeRolesFromRole.html">revokeRolesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/rolesInfo.html">rolesInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/updateRole.html">updateRole</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-replication.html">Replication Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/applyOps.html">applyOps</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/isMaster.html">isMaster</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetAbortPrimaryCatchUp.html">replSetAbortPrimaryCatchUp</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetFreeze.html">replSetFreeze</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetGetConfig.html">replSetGetConfig</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetGetStatus.html">replSetGetStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetInitiate.html">replSetInitiate</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetMaintenance.html">replSetMaintenance</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetReconfig.html">replSetReconfig</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetResizeOplog.html">replSetResizeOplog</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetStepDown.html">replSetStepDown</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/replSetSyncFrom.html">replSetSyncFrom</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-sharding.html">Sharding Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/addShard.html">addShard</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/addShardToZone.html">addShardToZone</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/balancerStart.html">balancerStart</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/balancerStatus.html">balancerStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/balancerStop.html">balancerStop</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/checkShardingIndex.html">checkShardingIndex</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/clearJumboFlag.html">clearJumboFlag</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/cleanupOrphaned.html">cleanupOrphaned</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/enableSharding.html">enableSharding</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/flushRouterConfig.html">flushRouterConfig</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getShardMap.html">getShardMap</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getShardVersion.html">getShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/isdbgrid.html">isdbgrid</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/listShards.html">listShards</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/medianKey.html">medianKey</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/moveChunk.html">moveChunk</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/movePrimary.html">movePrimary</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/mergeChunks.html">mergeChunks</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/removeShard.html">removeShard</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/removeShardFromZone.html">removeShardFromZone</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/setShardVersion.html">setShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/shardCollection.html">shardCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/shardingState.html">shardingState</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/split.html">split</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/splitChunk.html">splitChunk</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/splitVector.html">splitVector</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/unsetSharding.html">unsetSharding</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/updateZoneKeyRange.html">updateZoneKeyRange</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-sessions.html">Sessions Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/abortTransaction.html">abortTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/commitTransaction.html">commitTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/endSessions.html">endSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/killAllSessions.html">killAllSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/killAllSessionsByPattern.html">killAllSessionsByPattern</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/killSessions.html">killSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/refreshSessions.html">refreshSessions</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/startSession.html">startSession</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-administration.html">Administration Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/clean.html">clean</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/cloneCollection.html">cloneCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/cloneCollectionAsCapped.html">cloneCollectionAsCapped</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/collMod.html">collMod</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/compact.html">compact</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/connPoolSync.html">connPoolSync</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/convertToCapped.html">convertToCapped</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/create.html">create</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/createIndexes.html">createIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/currentOp.html">currentOp</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/drop.html">drop</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dropDatabase.html">dropDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dropConnections.html">dropConnections</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dropIndexes.html">dropIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/filemd5.html">filemd5</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/fsync.html">fsync</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/fsyncUnlock.html">fsyncUnlock</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getParameter.html">getParameter</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/killCursors.html">killCursors</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/killOp.html">killOp</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/listCollections.html">listCollections</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/listDatabases.html">listDatabases</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/listIndexes.html">listIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/logRotate.html">logRotate</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/reIndex.html">reIndex</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/renameCollection.html">renameCollection</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/setFeatureCompatibilityVersion.html">setFeatureCompatibilityVersion</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/setParameter.html">setParameter</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/shutdown.html">shutdown</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-diagnostic.html">Diagnostic Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/availableQueryOptions.html">availableQueryOptions</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/buildInfo.html">buildInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/collStats.html">collStats</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/connPoolStats.html">connPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/connectionStatus.html">connectionStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/cursorInfo.html">cursorInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dataSize.html">dataSize</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dbHash.html">dbHash</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/dbStats.html">dbStats</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/diagLogging.html">diagLogging</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/driverOIDTest.html">driverOIDTest</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/explain.html">explain</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/features.html">features</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getCmdLineOpts.html">getCmdLineOpts</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/getLog.html">getLog</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/hostInfo.html">hostInfo</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/isSelf.html">isSelf</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/listCommands.html">listCommands</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/netstat.html">netstat</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/ping.html">ping</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/profile.html">profile</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/serverStatus.html">serverStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/shardConnPoolStats.html">shardConnPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/top.html">top</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/validate.html">validate</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/whatsmyuri.html">whatsmyuri</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-free-monitoring.html">Free Monitoring Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/getFreeMonitoringStatus.html">getFreeMonitoringStatus</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/command/setFreeMonitoring.html">setFreeMonitoring</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/command/nav-auditing.html">System Events Auditing Commands</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/command/logApplicationMessage.html">logApplicationMessage</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/method.html"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-collection.html">Collection Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.aggregate.html">db.collection.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.bulkWrite.html">db.collection.bulkWrite()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.copyTo.html">db.collection.copyTo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.count.html">db.collection.count()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.countDocuments.html">db.collection.countDocuments()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.estimatedDocumentCount.html">db.collection.estimatedDocumentCount()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.createIndex.html">db.collection.createIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.createIndexes.html">db.collection.createIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.dataSize.html">db.collection.dataSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.deleteOne.html">db.collection.deleteOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.deleteMany.html">db.collection.deleteMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.distinct.html">db.collection.distinct()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.drop.html">db.collection.drop()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.dropIndex.html">db.collection.dropIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.dropIndexes.html">db.collection.dropIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.ensureIndex.html">db.collection.ensureIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.explain.html">db.collection.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.find.html">db.collection.find()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.findAndModify.html">db.collection.findAndModify()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.findOne.html">db.collection.findOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.findOneAndDelete.html">db.collection.findOneAndDelete()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.findOneAndReplace.html">db.collection.findOneAndReplace()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.findOneAndUpdate.html">db.collection.findOneAndUpdate()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.getIndexes.html">db.collection.getIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.getShardDistribution.html">db.collection.getShardDistribution()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.getShardVersion.html">db.collection.getShardVersion()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.insert.html">db.collection.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.insertOne.html">db.collection.insertOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.insertMany.html">db.collection.insertMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.isCapped.html">db.collection.isCapped()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.latencyStats.html">db.collection.latencyStats()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.mapReduce.html">db.collection.mapReduce()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.reIndex.html">db.collection.reIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.remove.html">db.collection.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.renameCollection.html">db.collection.renameCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.replaceOne.html">db.collection.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.save.html">db.collection.save()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.stats.html">db.collection.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.storageSize.html">db.collection.storageSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.totalIndexSize.html">db.collection.totalIndexSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.totalSize.html">db.collection.totalSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.update.html">db.collection.update()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.updateOne.html">db.collection.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.updateMany.html">db.collection.updateMany()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.watch.html">db.collection.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.validate.html">db.collection.validate()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-cursor.html">Cursor Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.addOption.html">cursor.addOption()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.allowPartialResults.html">cursor.allowPartialResults()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.batchSize.html">cursor.batchSize()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.close.html">cursor.close()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.isClosed.html">cursor.isClosed()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.collation.html">cursor.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.comment.html">cursor.comment()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.count.html">cursor.count()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.explain.html">cursor.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.forEach.html">cursor.forEach()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.hasNext.html">cursor.hasNext()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.hint.html">cursor.hint()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.isExhausted.html">cursor.isExhausted()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.itcount.html">cursor.itcount()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.limit.html">cursor.limit()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.map.html">cursor.map()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.max.html">cursor.max()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.maxTimeMS.html">cursor.maxTimeMS()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.min.html">cursor.min()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.next.html">cursor.next()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.noCursorTimeout.html">cursor.noCursorTimeout()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.objsLeftInBatch.html">cursor.objsLeftInBatch()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.pretty.html">cursor.pretty()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.readConcern.html">cursor.readConcern()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.readPref.html">cursor.readPref()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.returnKey.html">cursor.returnKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.showRecordId.html">cursor.showRecordId()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.size.html">cursor.size()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.skip.html">cursor.skip()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.sort.html">cursor.sort()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.tailable.html">cursor.tailable()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cursor.toArray.html">cursor.toArray()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-database.html">Database Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.adminCommand.html">db.adminCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.aggregate.html">db.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.cloneCollection.html">db.cloneCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.cloneDatabase.html">db.cloneDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.commandHelp.html">db.commandHelp()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.copyDatabase.html">db.copyDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.createCollection.html">db.createCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.createView.html">db.createView()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.currentOp.html">db.currentOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.dropDatabase.html">db.dropDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.eval.html">db.eval()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.fsyncLock.html">db.fsyncLock()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.fsyncUnlock.html">db.fsyncUnlock()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getCollection.html">db.getCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getCollectionInfos.html">db.getCollectionInfos()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getCollectionNames.html">db.getCollectionNames()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getLastError.html">db.getLastError()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getLastErrorObj.html">db.getLastErrorObj()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getLogComponents.html">db.getLogComponents()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getMongo.html">db.getMongo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getName.html">db.getName()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getProfilingLevel.html">db.getProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getProfilingStatus.html">db.getProfilingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getReplicationInfo.html">db.getReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getSiblingDB.html">db.getSiblingDB()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.help.html">db.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.hostInfo.html">db.hostInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.isMaster.html">db.isMaster()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.killOp.html">db.killOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.listCommands.html">db.listCommands()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.logout.html">db.logout()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.printCollectionStats.html">db.printCollectionStats()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.printReplicationInfo.html">db.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.printShardingStatus.html">db.printShardingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.printSlaveReplicationInfo.html">db.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.resetError.html">db.resetError()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.runCommand.html">db.runCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.serverBuildInfo.html">db.serverBuildInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.serverCmdLineOpts.html">db.serverCmdLineOpts()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.serverStatus.html">db.serverStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.setLogLevel.html">db.setLogLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.setProfilingLevel.html">db.setProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.shutdownServer.html">db.shutdownServer()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.stats.html">db.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.version.html">db.version()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.watch.html">db.watch()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-plan-cache.html">Query Plan Cache Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.getPlanCache.html">db.collection.getPlanCache()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/PlanCache.clear.html">PlanCache.clear()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/PlanCache.clearPlansByQuery.html">PlanCache.clearPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/PlanCache.getPlansByQuery.html">PlanCache.getPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/PlanCache.help.html">PlanCache.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/PlanCache.listQueryShapes.html">PlanCache.listQueryShapes()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-bulk.html">Bulk Operation Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.initializeOrderedBulkOp.html">db.collection.initializeOrderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.collection.initializeUnorderedBulkOp.html">db.collection.initializeUnorderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.html">Bulk()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.execute.html">Bulk.execute()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.html">Bulk.find()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.arrayFilters.html">Bulk.find.arrayFilters()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.collation.html">Bulk.find.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.hint.html">Bulk.find.hint()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.remove.html">Bulk.find.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.removeOne.html">Bulk.find.removeOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.replaceOne.html">Bulk.find.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.updateOne.html">Bulk.find.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.update.html">Bulk.find.update()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.find.upsert.html">Bulk.find.upsert()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.getOperations.html">Bulk.getOperations()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.insert.html">Bulk.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.tojson.html">Bulk.tojson()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Bulk.toString.html">Bulk.toString()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-user-management.html">User Management Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.auth.html">db.auth()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.changeUserPassword.html">db.changeUserPassword()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.createUser.html">db.createUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.dropUser.html">db.dropUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.dropAllUsers.html">db.dropAllUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getUser.html">db.getUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getUsers.html">db.getUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.grantRolesToUser.html">db.grantRolesToUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.removeUser.html">db.removeUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.revokeRolesFromUser.html">db.revokeRolesFromUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.updateUser.html">db.updateUser()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/passwordPrompt.html">passwordPrompt()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-role-management.html">Role Management Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.createRole.html">db.createRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.dropRole.html">db.dropRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.dropAllRoles.html">db.dropAllRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getRole.html">db.getRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getRoles.html">db.getRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.grantPrivilegesToRole.html">db.grantPrivilegesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.revokePrivilegesFromRole.html">db.revokePrivilegesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.grantRolesToRole.html">db.grantRolesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.revokeRolesFromRole.html">db.revokeRolesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.updateRole.html">db.updateRole()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-replication.html">Replication Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.add.html">rs.add()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.addArb.html">rs.addArb()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.conf.html">rs.conf()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.freeze.html">rs.freeze()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.help.html">rs.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.initiate.html">rs.initiate()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.printReplicationInfo.html">rs.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.printSlaveReplicationInfo.html">rs.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.reconfig.html">rs.reconfig()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.remove.html">rs.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.slaveOk.html">rs.slaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.status.html">rs.status()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.stepDown.html">rs.stepDown()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rs.syncFrom.html">rs.syncFrom()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-sharding.html">Sharding Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.addShard.html">sh.addShard()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.addShardTag.html">sh.addShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.addShardToZone.html">sh.addShardToZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.addTagRange.html">sh.addTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.disableBalancing.html">sh.disableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.enableBalancing.html">sh.enableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.disableAutoSplit.html">sh.disableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.enableAutoSplit.html">sh.enableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.enableSharding.html">sh.enableSharding()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.getBalancerHost.html">sh.getBalancerHost()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.getBalancerState.html">sh.getBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.removeTagRange.html">sh.removeTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.removeRangeFromZone.html">sh.removeRangeFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.help.html">sh.help()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.isBalancerRunning.html">sh.isBalancerRunning()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.moveChunk.html">sh.moveChunk()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.removeShardTag.html">sh.removeShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.removeShardFromZone.html">sh.removeShardFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.setBalancerState.html">sh.setBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.shardCollection.html">sh.shardCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.splitAt.html">sh.splitAt()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.splitFind.html">sh.splitFind()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.startBalancer.html">sh.startBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.status.html">sh.status()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.stopBalancer.html">sh.stopBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.waitForBalancer.html">sh.waitForBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.waitForBalancerOff.html">sh.waitForBalancerOff()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.waitForPingChange.html">sh.waitForPingChange()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sh.updateZoneKeyRange.html">sh.updateZoneKeyRange()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/convertShardKeyToHashed.html">convertShardKeyToHashed</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-free-monitoring.html">Free Monitoring Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.disableFreeMonitoring.html">db.disableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.enableFreeMonitoring.html">db.enableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/db.getFreeMonitoringStatus.html">db.getFreeMonitoringStatus</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-constructor.html">Object Constructors and Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/BulkWriteResult.html">BulkWriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Date.html">Date()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/ObjectId.html">ObjectId</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/ObjectId.getTimestamp.html">ObjectId.getTimestamp()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/ObjectId.toString.html">ObjectId.toString()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/ObjectId.valueOf.html">ObjectId.valueOf()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/UUID.html">UUID()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/WriteResult.html">WriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/WriteResult.hasWriteError.html">WriteResult.hasWriteError()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/WriteResult.hasWriteConcernError.html">WriteResult.hasWriteConcernError()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-connection.html">Connection Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/connect.html">connect()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.html">Mongo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.getDB.html">Mongo.getDB()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.getReadPrefMode.html">Mongo.getReadPrefMode()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.getReadPrefTagSet.html">Mongo.getReadPrefTagSet()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.isCausalConsistency.html">Mongo.isCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.setCausalConsistency.html">Mongo.setCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.setReadPref.html">Mongo.setReadPref()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.setSlaveOk.html">Mongo.setSlaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.startSession.html">Mongo.startSession()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Mongo.watch.html">Mongo.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/Session.html">Session</a><ul><li class="toctree-l5"><a class="reference internal" href="../reference/method/Session.abortTransaction.html">Session.abortTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/method/Session.commitTransaction.html">Session.commitTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="../reference/method/Session.startTransaction.html">Session.startTransaction()</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/SessionOptions.html">SessionOptions</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-native.html">Native Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/cat.html">cat()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/cd.html">cd()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/copyDbpath.html">copyDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/getHostName.html">getHostName()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/getMemInfo.html">getMemInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/hostname.html">hostname()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/isInteractive.html">isInteractive()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/listFiles.html">listFiles()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/load.html">load()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/ls.html">ls()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/md5sumFile.html">md5sumFile()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/mkdir.html">mkdir()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/pwd.html">pwd()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/quit.html">quit()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/removeFile.html">removeFile()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/resetDbpath.html">resetDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/sleep.html">sleep()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/setVerboseShell.html">setVerboseShell()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/version.html">version()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/isWindows.html">_isWindows()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/rand.html">_rand()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="../reference/method/js-client-side-field-level-encryption.html">Client-Side Field Level Encryption Methods</a><ul><li class="toctree-l4"><a class="reference internal" href="../reference/method/getKeyVault.html">getKeyVault()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/KeyVault.createKey.html">KeyVault.createKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/KeyVault.deleteKey.html">KeyVault.deleteKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/KeyVault.getKey.html">KeyVault.getKey()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/KeyVault.getKeys.html">KeyVault.getKeys()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/KeyVault.addKeyAlternateName.html">KeyVault.addKeyAlternateName()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/KeyVault.removeKeyAlternateName.html">KeyVault.removeKeyAlternateName()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/KeyVault.getKeyByAltName.html">KeyVault.getKeyByAltName()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/getClientEncryption.html">getClientEncryption()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/ClientEncryption.encrypt.html">ClientEncryption.encrypt()</a></li><li class="toctree-l4"><a class="reference internal" href="../reference/method/ClientEncryption.decrypt.html">ClientEncryption.decrypt()</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/program.html">MongoDB Package Components</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongod.html"><code class="docutils literal"><span class="pre">mongod</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongos.html"><code class="docutils literal"><span class="pre">mongos</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongo.html"><code class="docutils literal"><span class="pre">mongo</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongod.exe.html"><code class="docutils literal"><span class="pre">mongod.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongos.exe.html"><code class="docutils literal"><span class="pre">mongos.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongodump.html"><code class="docutils literal"><span class="pre">mongodump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongorestore.html"><code class="docutils literal"><span class="pre">mongorestore</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/bsondump.html"><code class="docutils literal"><span class="pre">bsondump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongoimport.html"><code class="docutils literal"><span class="pre">mongoimport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongoexport.html"><code class="docutils literal"><span class="pre">mongoexport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongostat.html"><code class="docutils literal"><span class="pre">mongostat</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongotop.html"><code class="docutils literal"><span class="pre">mongotop</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongoreplay.html"><code class="docutils literal"><span class="pre">mongoreplay</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongoldap.html"><code class="docutils literal"><span class="pre">mongoldap</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/mongofiles.html"><code class="docutils literal"><span class="pre">mongofiles</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="../reference/program/install_compass.html"><code class="docutils literal"><span class="pre">install_compass</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/configuration-options.html">Configuration File Options</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/expansion-directives.html">Externally Sourced Configuration File Values</a></li><li class="toctree-l3"><a class="reference internal" href="../tutorial/convert-command-line-options-to-yaml.html">Convert Command-Line Options to YAML</a></li><li class="toctree-l3"><a class="reference internal" href="../reference/configuration-file-settings-command-line-options-mapping.html">Configuration File Settings and Command-Line Options Mapping</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/parameters.html">MongoDB Server Parameters</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/limits.html">MongoDB Limits and Thresholds</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/explain-results.html">Explain Results</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/system-collections.html">System Collections</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/connection-string.html">Connection String URI Format</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/collation.html">Collation</a><ul><li class="toctree-l3"><a class="reference internal" href="../reference/collation-locales-defaults.html">Collation Locales and Default Parameters</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="../reference/mongodb-wire-protocol.html">MongoDB Wire Protocol</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/log-messages.html">Log Messages</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/exit-codes.html">Exit Codes and Statuses</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/glossary.html">Glossary</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/default-mongodb-port.html">Default MongoDB Port</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/server-sessions.html">Server Sessions</a></li></ul></li><li class="toctree-l1 current"><a class="reference internal" href="../release-notes.html">Release Notes</a><ul class="current"><li class="toctree-l2"><a class="reference internal" href="4.2.html">Release Notes for MongoDB 4.2</a><ul><li class="toctree-l3"><a class="reference internal" href="4.2-compatibility.html">Compatibility Changes in MongoDB 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="4.2-upgrade-standalone.html">Upgrade a Standalone to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="4.2-upgrade-replica-set.html">Upgrade a Replica Set to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="4.2-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 4.2</a></li><li class="toctree-l3"><a class="reference internal" href="4.2-downgrade.html">Downgrade 4.2 to 4.0</a><ul><li class="toctree-l4"><a class="reference internal" href="4.2-downgrade-standalone.html">Downgrade 4.2 Standalone to 4.0</a></li><li class="toctree-l4"><a class="reference internal" href="4.2-downgrade-replica-set.html">Downgrade 4.2 Replica Set to 4.0</a></li><li class="toctree-l4"><a class="reference internal" href="4.2-downgrade-sharded-cluster.html">Downgrade 4.2 Sharded Cluster to 4.0</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="4.2-changelog.html">4.2 Changelog</a></li></ul></li><li class="toctree-l2 current"><a class="reference internal current" href="">Release Notes for MongoDB 4.0</a><ul><li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html">Compatibility Changes in MongoDB 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html">Upgrade a Standalone to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html">Upgrade a Replica Set to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-standalone.html">Downgrade 4.0 Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html">Downgrade 4.0 Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html">Downgrade 4.0 Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html">4.0 Changelog</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="3.6.html">Release Notes for MongoDB 3.6</a><ul><li class="toctree-l3"><a class="reference internal" href="3.6-changelog.html">3.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="3.6-compatibility.html">Compatibility Changes in MongoDB 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="3.6-upgrade-standalone.html">Upgrade a Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="3.6-upgrade-replica-set.html">Upgrade a Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="3.6-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="3.6-downgrade-standalone.html">Downgrade 3.6 Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="3.6-downgrade-replica-set.html">Downgrade 3.6 Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="3.6-downgrade-sharded-cluster.html">Downgrade 3.6 Sharded Cluster to 3.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="3.4.html">Release Notes for MongoDB 3.4</a><ul><li class="toctree-l3"><a class="reference internal" href="3.4-changelog.html">3.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="3.4-compatibility.html">Compatibility Changes in MongoDB 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="3.4-upgrade-standalone.html">Upgrade a Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="3.4-upgrade-replica-set.html">Upgrade a Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="3.4-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="3.4-downgrade.html">Downgrade MongoDB 3.4 to 3.2</a><ul><li class="toctree-l4"><a class="reference internal" href="3.4-downgrade-standalone.html">Downgrade 3.4 Standalone to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="3.4-downgrade-replica-set.html">Downgrade 3.4 Replica Set to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="3.4-downgrade-sharded-cluster.html">Downgrade 3.4 Sharded Cluster to 3.2</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="3.2.html">Release Notes for MongoDB 3.2</a><ul><li class="toctree-l3"><a class="reference internal" href="3.2-changelog.html">3.2 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="3.2-compatibility.html">Compatibility Changes in MongoDB 3.2</a><ul><li class="toctree-l4"><a class="reference internal" href="3.2-javascript.html">JavaScript Changes in MongoDB 3.2</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="3.2-upgrade.html">Upgrade MongoDB to 3.2</a></li><li class="toctree-l3"><a class="reference internal" href="3.2-downgrade.html">Downgrade MongoDB from 3.2</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="3.0.html">Release Notes for MongoDB 3.0</a><ul><li class="toctree-l3"><a class="reference internal" href="3.0-changelog.html">3.0 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="3.0-compatibility.html">Compatibility Changes in MongoDB 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="3.0-upgrade.html">Upgrade MongoDB to 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="3.0-scram.html">Upgrade to SCRAM</a></li><li class="toctree-l3"><a class="reference internal" href="3.0-downgrade.html">Downgrade MongoDB from 3.0</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="2.6.html">Release Notes for MongoDB 2.6</a><ul><li class="toctree-l3"><a class="reference internal" href="2.6-changelog.html">2.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="2.6-compatibility.html">Compatibility Changes in MongoDB 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="2.6-upgrade.html">Upgrade MongoDB to 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="2.6-upgrade-authorization.html">Upgrade User Authorization Data to 2.6 Format</a></li><li class="toctree-l3"><a class="reference internal" href="2.6-downgrade.html">Downgrade MongoDB from 2.6</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="2.4.html">Release Notes for MongoDB 2.4</a><ul><li class="toctree-l3"><a class="reference internal" href="2.4-changelog.html">2.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="2.4-javascript.html">JavaScript Changes in MongoDB 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="2.4-upgrade.html">Upgrade MongoDB to 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="2.4-index-types.html">Compatibility and Index Type Changes in MongoDB 2.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="2.2.html">Release Notes for MongoDB 2.2</a></li><li class="toctree-l2"><a class="reference internal" href="2.0.html">Release Notes for MongoDB 2.0</a></li><li class="toctree-l2"><a class="reference internal" href="1.8.html">Release Notes for MongoDB 1.8</a></li><li class="toctree-l2"><a class="reference internal" href="1.6.html">Release Notes for MongoDB 1.6</a></li><li class="toctree-l2"><a class="reference internal" href="1.4.html">Release Notes for MongoDB 1.4</a></li><li class="toctree-l2"><a class="reference internal" href="1.2.html">Release Notes for MongoDB 1.2.x</a></li><li class="toctree-l2"><a class="reference internal" href="../reference/versioning.html">MongoDB Versioning</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="../support.html">Technical Support</a></li></ul>


    </div>
  </div>
           
         </aside>

   </div>

    <div id="main-column" class="main-column">

    <span id="showNav" class="showNav">Navigation</span>

      
        <div class="document">
            <div class="documentwrapper"><div class="bodywrapper">
              <div class="body" data-pagename="release-notes/4.0">
                   <a class="edit-link" href="https://github.com/mongodb/docs/blob/v4.2/source/release-notes/4.0.txt" target="_blank" title="Edit release-notes/4.0.txt on GitHub">
    
      <span class="icon-edit"></span>
    
  </a>
                

                
  <div class="bc">
    
      <ul>
          <li><a href="../release-notes.html">Release Notes</a><span class="bcpoint"> > </span></li>
            <li>Release Notes for MongoDB 4.0</li> 
      </ul>
    
    
  </div>
                
                  <div class="section" id="release-notes-for-mongodb-4-0">
<h1>Release Notes for MongoDB 4.0<a class="headerlink" href="#release-notes-for-mongodb-4-0" title="Permalink to this headline">¶</a></h1>
<div class="contents twocols local topic" id="on-this-page">
<p class="topic-title first">On this page</p>
<ul class="simple">
<li><a class="reference internal" href="#minor-releases" id="id30">Minor Releases</a></li>
<li><a class="reference internal" href="#multi-document-transactions" id="id31">Multi-Document Transactions</a></li>
<li><a class="reference internal" href="#aggregation" id="id32">Aggregation</a></li>
<li><a class="reference internal" href="#drivers" id="id33">MongoDB Drivers</a></li>
<li><a class="reference internal" href="#security" id="id34">Security</a></li>
<li><a class="reference internal" href="#deprecate-mmapv1" id="id35">Deprecate MMAPv1</a></li>
<li><a class="reference internal" href="#replica-set" id="id36">Replica Set</a></li>
<li><a class="reference internal" href="#change-streams" id="id37">Change Streams</a></li>
<li><a class="reference internal" href="#free-monitoring" id="id38">Free Monitoring</a></li>
<li><a class="reference internal" href="#sharded-clusters" id="id39">Sharded Clusters</a></li>
<li><a class="reference internal" href="#msi-installer-on-windows" id="id40"><code class="docutils literal"><span class="pre">.msi</span></code> Installer on Windows</a></li>
<li><a class="reference internal" href="#platform-support" id="id41">Platform Support</a></li>
<li><a class="reference internal" href="#mongodb-tools" id="id42">MongoDB Tools</a></li>
<li><a class="reference internal" href="#general-improvements" id="id43">General Improvements</a></li>
<li><a class="reference internal" href="#changes-affecting-compatibility" id="id44">Changes Affecting Compatibility</a></li>
<li><a class="reference internal" href="#upgrade-procedures" id="id45">Upgrade Procedures</a></li>
<li><a class="reference internal" href="#download" id="id46">Download</a></li>
<li><a class="reference internal" href="#known-issues-in-4-0-3" id="id47">Known Issues in 4.0.3</a></li>
<li><a class="reference internal" href="#known-issues-in-4-0-2" id="id48">Known Issues in 4.0.2</a></li>
<li><a class="reference internal" href="#known-issues-in-4-0-1" id="id49">Known Issues in 4.0.1</a></li>
<li><a class="reference internal" href="#known-issues-in-4-0-0" id="id50">Known Issues in 4.0.0</a></li>
<li><a class="reference internal" href="#report-an-issue" id="id51">Report an Issue</a></li>
</ul>
</div>
<div class="section" id="minor-releases">
<h2>Minor Releases<a class="headerlink" href="#minor-releases" title="Permalink to this headline">¶</a></h2>
<div class="section" id="apr-15-2020">
<span id="release-notes"></span><h3>4.0.18 - Apr 15, 2020<a class="headerlink" href="#apr-15-2020" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-44892">SERVER-44892</a>: getShardDistribution should use $collStats agg stage instead of collStats command</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-45119">SERVER-45119</a>: CollectionShardingState::getCurrentShardVersionIfKnown returns collection version instead of shard version</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.18%27">All JIRA issues closed in 4.0.18</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id1"><span class="std std-ref">4.0.18 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="mar-25-2020">
<span id="id1"></span><h3>4.0.17 - Mar 25, 2020<a class="headerlink" href="#mar-25-2020" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-46466">SERVER-46466</a>: Race with findAndModify retryable write and session migration</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-46365">SERVER-46365</a>: getMore command before rs.initiate() can trip invariant</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-46238">SERVER-46238</a>: Race between commitTransaction and transaction expiration leads to invariant</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-44598">SERVER-44598</a>: Shards do not treat the IGNORED version as “intended sharded”</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35050">SERVER-35050</a>: Don’t abort collection clone due to negative document count</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/WT-5395">WT-5395</a>:  Fix a bug in the read lock implementation when there is a lot of contention</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.17%27">All JIRA issues closed in 4.0.17</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id3"><span class="std std-ref">4.0.17 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="feb-5-2020">
<span id="id2"></span><h3>4.0.16 - Feb 5, 2020<a class="headerlink" href="#feb-5-2020" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38794">SERVER-38794</a>: CollectionOptions can be lost in createCollection if a write conflict exception is thrown</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-45831">SERVER-45831</a>: [4.0] Performance regression processing large aggregation commands</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.16%27">All JIRA issues closed in 4.0.16</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id9"><span class="std std-ref">4.0.16 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="jan-27-2020">
<span id="id3"></span><h3>4.0.15 - Jan 27, 2020<a class="headerlink" href="#jan-27-2020" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-42565">SERVER-42565</a>: Aggregations and find commands sort missing fields differently</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-44341">SERVER-44341</a>: Do not choose only first shard of all shards associated with a zone when pre-splitting during shard collection</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-40435">SERVER-40435</a>: A clearJumboFlag command to clear the jumbo flag</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-45309">SERVER-45309</a>: Ensure bind credentials live longer than LDAP operations</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-44733">SERVER-44733</a>: Change stream should throw ChangeStreamFatalError if a single shard cannot be targeted for updateLookup</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-45396">SERVER-45396</a>: fix the “me” field in isMaster responses when using splithorizon</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/WT-5042">WT-5042</a>: Reduce configuration parsing overhead from checkpoints</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.15%27">All JIRA issues closed in 4.0.15</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id16"><span class="std std-ref">4.0.15 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="dec-18-2019">
<span id="id4"></span><h3>4.0.14 - Dec 18, 2019<a class="headerlink" href="#dec-18-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-31083">SERVER-31083</a>:  Allow passing primary shard to “enableSharding” command for a new</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-44174">SERVER-44174</a>:  $push and $addToSet should restrict memory usage</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-44050">SERVER-44050</a>:  Arrays along ‘hashed’ index key path are not correctly rejected</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-43632">SERVER-43632</a>:  Possible memory leak in 4.0</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.14%27">All JIRA issues closed in 4.0.14</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id27"><span class="std std-ref">4.0.14 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="oct-19-2019">
<span id="id5"></span><h3>4.0.13 - Oct 19, 2019<a class="headerlink" href="#oct-19-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37690">SERVER-37690</a>: countDocuments throws an error when matching 0 document</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-41939">SERVER-41939</a>: Connect to fastest LDAP server first</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/WT-4869">WT-4869</a>: Stop adding cache pressure when eviction is falling behind</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/WT-4882">WT-4882</a>: Improve checkpoint performance when there are large metadata pages</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/WT-4898">WT-4898</a>: Don’t allow the eviction server to reconcile if it’s busy</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.13%27">All JIRA issues closed in 4.0.13</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id38"><span class="std std-ref">4.0.13 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="aug-12-2019">
<span id="id6"></span><h3>4.0.12 - Aug 12, 2019<a class="headerlink" href="#aug-12-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-41829">SERVER-41829</a>: findAndModify ignores filter expressions that are not objects.</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-42603">SERVER-42603</a>: Recent service file change may cause cyclic dependencies.</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.12%27">All JIRA issues closed in 4.0.12</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id48"><span class="std std-ref">4.0.12 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="jul-26-2019">
<span id="id7"></span><h3>4.0.11 - Jul 26, 2019<a class="headerlink" href="#jul-26-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-39756">SERVER-39756</a>: Sharding a very large collection can result in
a long stall of writes against this collection</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-40134">SERVER-40134</a>: Distinct command against a view can return
incorrect results when the distinct path is multikey</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-40535">SERVER-40535</a>: Possibility to get a non-existent key if using
ReadConcern level:local when reading signing keys in ReplicaSet</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-41361">SERVER-41361</a>:  Do not read at lastApplied while already holding the PBWM lock on secondaries</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-41869">SERVER-41869</a>:  Reverse mutex acquisition order in CatalogCache::_scheduleCollectionRefresh</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-42055">SERVER-42055</a>:  Only acquire a collection IX lock to write the lastVote document</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-42232">SERVER-42232</a>: Adding a new shard renders all preceding
resume tokens invalid</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.11%27">All JIRA issues closed in 4.0.11</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id57"><span class="std std-ref">4.0.11 Changelog</span></a></li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Fixed issues include those that resolve the following Common
Vulnerabilities and Exposures (CVEs):</p>
<ul class="last simple">
<li>CVE-2019-2389 (See <a class="reference external" href="https://jira.mongodb.org/browse/SERVER-40563">SERVER-40563</a>)</li>
<li>CVE-2019-2390 (See <a class="reference external" href="https://jira.mongodb.org/browse/SERVER-42233">SERVER-42233</a>)</li>
</ul>
</div>
</div>
<div class="section" id="may-31-2019">
<span id="id8"></span><h3>4.0.10 - May 31, 2019<a class="headerlink" href="#may-31-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37765">SERVER-37765</a>: Remove Support for Ubuntu 14.04</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-30356">SERVER-30356</a>: Improve error report for validate command</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38867">SERVER-38867</a>: Refine handling of system.* collections in listCollections/show collections</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-39672">SERVER-39672</a>: Default to <a class="reference internal" href="../reference/read-concern-local.html#readconcern.&quot;local&quot;" title="&quot;local&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;local&quot;</span></code></a> read concern if unspecified for multi-document transactions</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/WT-4769">WT-4769</a>: Don’t discard active history for empty pages</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.10%27">All JIRA issues closed in 4.0.10</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id68"><span class="std std-ref">4.0.10 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="apr-16-2019">
<span id="id9"></span><h3>4.0.9 - Apr 16, 2019<a class="headerlink" href="#apr-16-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38949">SERVER-38949</a>: Incorrect index bounds for {$ne: [“String”]} query</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38984">SERVER-38984</a>: Attach IDs to users</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-39178">SERVER-39178</a>: Negotiate SCRAM mechanism in MongoURI::connect()</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-40333">SERVER-40333</a>: Only clone collection options once for each shard on shard collection</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.9%27">All JIRA issues closed in 4.0.9</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id78"><span class="std std-ref">4.0.9 Changelog</span></a></li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Fixed issues include those that resolve the following Common
Vulnerabilities and Exposures (CVEs):</p>
<ul class="last simple">
<li>CVE-2019-2386 (See <a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38984">SERVER-38984</a>)</li>
</ul>
</div>
</div>
<div class="section" id="mar-29-2019">
<span id="id10"></span><h3>4.0.8 - Mar 29, 2019<a class="headerlink" href="#mar-29-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-40355">SERVER-40355</a>:  rs.config that contains an <code class="docutils literal"><span class="pre">_id</span></code> greater than the number of nodes will crash</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38994">SERVER-38994</a>:  Step down on SIGTERM.  See <a class="reference internal" href="../tutorial/manage-mongodb-processes.html#kill-sigterm"><span class="std std-ref">SIGTERM and Replica Sets</span></a>.</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37722">SERVER-37722</a>:  Quiet mode does not suppress connection end events</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37389">SERVER-37389</a>:  Give different messages for different connection failure reasons</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.8%27">All JIRA issues closed in 4.0.8</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id88"><span class="std std-ref">4.0.8 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="mar-25-2019">
<span id="id11"></span><h3>4.0.7 - Mar 25, 2019<a class="headerlink" href="#mar-25-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-13779">SERVER-13779</a>:  Allow $not to be applied to $regex (currently only /regex/ syntax is allowed)</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35740">SERVER-35740</a>:  Report high-water-mark resume token with each (possibly empty) change stream batch</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/TOOLS-2158">TOOLS-2158</a>:  mongodump failing on Windows with “error opening system CA store: Access is denied.”</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.7%27">All JIRA issues closed in 4.0.7</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id98"><span class="std std-ref">4.0.7 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="feb-7-2019">
<span id="id12"></span><h3>4.0.6 - Feb 7, 2019<a class="headerlink" href="#feb-7-2019" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37778">SERVER-37778</a>: Platform Support: Add Community &amp; Enterprise Ubuntu 18.04 (zSeries)</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37777">SERVER-37777</a>: Platform Support: Add Community SLES12 (zSeries)</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37775">SERVER-37775</a>: Platform Support: Add Community RHEL7 (zSeries)</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-39180">SERVER-39180</a>: Wrong initial chunk owner shard can be selected when sharding non-empty collection with pre-created zones</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-32146">SERVER-32146</a>: Log slow oplog entry application</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38293">SERVER-38293</a>:  Make listDatabases understand collection privileges</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-38887">SERVER-38887</a>:  Mongo.getDBs() does not correctly inspect privileges</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.6%27">All JIRA issues closed in 4.0.6</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id110"><span class="std std-ref">4.0.6 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="dec-20-2018">
<span id="id13"></span><h3>4.0.5 - Dec 20, 2018<a class="headerlink" href="#dec-20-2018" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-36437">SERVER-36437</a>: The dbstats command should lock the database in MODE_IS instead of MODE_S</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37182">SERVER-37182</a>: Different values when referencing whole object vs. a field of that object after $arrayToObject</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37200">SERVER-37200</a>: $match stage following $listSessions not working against mongos</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37557">SERVER-37557</a>: Add startup warning about enableMajorityReadConcern and usage of arbiters</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.5%27">All JIRA issues closed in 4.0.5</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id121"><span class="std std-ref">4.0.5 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="nov-8-2018">
<span id="id14"></span><h3>4.0.4 - Nov 8, 2018<a class="headerlink" href="#nov-8-2018" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-26854">SERVER-26854</a>: LockStats for sub-operations should not include time for previous sub ops</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35323">SERVER-35323</a>: sessionId matching ignores userId part of the lsid</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37058">SERVER-37058</a>: Update with numeric field names inside an array can cause validation to fail</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-37132">SERVER-37132</a>: Negation of $in with regex can incorrectly plan from the cache, leading to missing query results</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/TOOLS-2069">TOOLS-2069</a>: mongoreplay does not support SCRAM-SHA-256</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/TOOLS-2131">TOOLS-2131</a>: mongorestore hang in replaying oplog with –archive and –oplogReplay option</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.4%27">All JIRA issues closed in 4.0.4</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id133"><span class="std std-ref">4.0.4 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="oct-9-2018">
<span id="id15"></span><h3>4.0.3 - Oct 9, 2018<a class="headerlink" href="#oct-9-2018" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-19815">SERVER-19815</a>: Make repair more robust with the WiredTiger storage engine</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35989">SERVER-35989</a>: <a class="reference internal" href="../reference/method/db.collection.countDocuments.html#db.collection.countDocuments" title="db.collection.countDocuments()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.collection.countDocuments()</span></code></a> and <a class="reference internal" href="../reference/method/db.collection.estimatedDocumentCount.html#db.collection.estimatedDocumentCount" title="db.collection.estimatedDocumentCount()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.collection.estimatedDocumentCount()</span></code></a> helpers</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-36982">SERVER-36982</a>: Reintroduce <code class="docutils literal"><span class="pre">enableMajorityReadConcern:false</span></code> server parameter</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.3%27">All JIRA issues closed in 4.0.3</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id144"><span class="std std-ref">4.0.3 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="aug-29-2018">
<span id="id16"></span><h3>4.0.2 - Aug 29, 2018<a class="headerlink" href="#aug-29-2018" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35720">SERVER-35720</a>: Allow zones to be created on non-existent collection</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35441">SERVER-35441</a>: drop/dropDatabase does not cleanup config.tags</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-36102">SERVER-36102</a>: Create initial chunks on appropriate shards for zoned sharding</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-36070">SERVER-36070</a>: Aggregation with $out results in error when Auditing is enabled</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-34846">SERVER-34846</a>: Covered index with collated field returns incorrect result when collation not involved in match or sort</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-34664">SERVER-34664</a>: Commands that are unsupported in a transaction should error</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.2%27">All JIRA issues closed in 4.0.2</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id157"><span class="std std-ref">4.0.2 Changelog</span></a></li>
</ul>
</div>
<div class="section" id="aug-6-2018">
<span id="id17"></span><h3>4.0.1 - Aug 6, 2018<a class="headerlink" href="#aug-6-2018" title="Permalink to this headline">¶</a></h3>
<p>Issues fixed:</p>
<ul class="simple">
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-33000">SERVER-33000</a>: Platform Support: add Ubuntu 18.04.</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-34933">SERVER-34933</a>: PCRE verb support.</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35101">SERVER-35101</a>: Handle bindIp argument that contains whitespaces.</li>
<li><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-36027">SERVER-36027</a>: Enterprise build does not recognize the <code class="docutils literal"><span class="pre">--redactClientLogData</span></code> flag.</li>
<li><a class="reference external" href="https://jira.mongodb.org/issues/?jql=project%20in%20(SERVER%2CTOOLS%2CWT)%20AND%20resolution%3D%27Fixed%27%20and%20fixversion%3D%274.0.1%27">All JIRA issues closed in 4.0.1</a></li>
<li><a class="reference internal" href="4.0-changelog.html#id169"><span class="std std-ref">4.0.1 Changelog</span></a></li>
</ul>
</div>
</div>
<div class="section" id="multi-document-transactions">
<span id="txn"></span><h2>Multi-Document Transactions<a class="headerlink" href="#multi-document-transactions" title="Permalink to this headline">¶</a></h2>
<p>Starting in version 4.0, MongoDB provides the ability to perform
<a class="reference internal" href="../core/transactions.html"><span class="doc">multi-document transactions</span></a> against replica
sets. With multi-document transactions, until a transaction commits, no
write operations in the transaction are visible outside the
transaction. That is, the multi-document transactions are atomic.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p>In most cases, multi-document transaction incurs a greater
performance cost over single document writes, and the
availability of multi-document transactions should not be a
replacement for effective schema design. For many scenarios, the
<a class="reference internal" href="../core/data-model-design.html#data-modeling-embedding"><span class="std std-ref">denormalized data model (embedded documents and arrays)</span></a> will continue to be optimal for your
data and use cases. That is, for many scenarios, modeling your data
appropriately will minimize the need for multi-document
transactions.</p>
<p class="last">For additional transactions usage considerations
(such as runtime limit and oplog size limit), see also
<a class="reference internal" href="../core/transactions-production-consideration.html"><span class="doc">Production Considerations</span></a>.</p>
</div>
<div class="section" id="feature-compatibility">
<h3>Feature Compatibility<a class="headerlink" href="#feature-compatibility" title="Permalink to this headline">¶</a></h3>
<p>The <code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> of all members of the replica set
must be <code class="docutils literal"><span class="pre">4.0</span></code> or greater. To check the
<code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> for a member, connect to the member and
run the following command:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="nx">db</span><span class="p">.</span><span class="nx">adminCommand</span><span class="p">(</span> <span class="p">{</span> <span class="nx">getParameter</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span> <span class="nx">featureCompatibilityVersion</span><span class="o">:</span> <span class="mi">1</span> <span class="p">}</span> <span class="p">)</span>
</pre></div>
</div>
</div>
<p>For more information on the <code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> flag, see
<a class="reference internal" href="../reference/command/setFeatureCompatibilityVersion.html#dbcmd.setFeatureCompatibilityVersion" title="setFeatureCompatibilityVersion"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setFeatureCompatibilityVersion</span></code></a>.</p>
</div>
<div class="section" id="mongo-shell-methods">
<h3><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods<a class="headerlink" href="#mongo-shell-methods" title="Permalink to this headline">¶</a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Method</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="../reference/method/Session.startTransaction.html#Session.startTransaction" title="Session.startTransaction()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">Session.startTransaction()</span></code></a></td>
<td>Starts a multi-statement transaction.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/method/Session.commitTransaction.html#Session.commitTransaction" title="Session.commitTransaction()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">Session.commitTransaction()</span></code></a></td>
<td>Commits the transaction.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/method/Session.abortTransaction.html#Session.abortTransaction" title="Session.abortTransaction()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">Session.abortTransaction()</span></code></a></td>
<td>Aborts the transaction.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="mongodb-drivers">
<h3>MongoDB Drivers<a class="headerlink" href="#mongodb-drivers" title="Permalink to this headline">¶</a></h3>
<p>Clients require MongoDB drivers <a class="reference internal" href="#drivers"><span class="std std-ref">updated for MongoDB 4.0</span></a> to use transactions.</p>
</div>
<div class="section" id="read-concern-snapshot">
<h3>Read Concern <code class="docutils literal"><span class="pre">snapshot</span></code><a class="headerlink" href="#read-concern-snapshot" title="Permalink to this headline">¶</a></h3>
<p>MongoDB 4.0 introduces a new read concern level
<a class="reference internal" href="../reference/read-concern-snapshot.html#readconcern.&quot;snapshot&quot;" title="&quot;snapshot&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;snapshot&quot;</span></code></a> for <a class="reference internal" href="../core/transactions.html"><span class="doc">multi-document transaction</span></a>.</p>
<p>For a <a class="reference internal" href="../core/transactions.html"><span class="doc">multi-document transaction</span></a>, MongoDB
may sometimes substitute a stronger read concern for
<a class="reference internal" href="../reference/read-concern-local.html#readconcern.&quot;local&quot;" title="&quot;local&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;local&quot;</span></code></a> and <a class="reference internal" href="../reference/read-concern-majority.html#readconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-readconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> read concern.</p>
<p>For a list of all operations that accept read concerns, see
<a class="reference internal" href="../reference/read-concern.html#read-concern-operations"><span class="std std-ref">Operations That Support Read Concern</span></a>.</p>
</div>
<div class="section" id="read-preference">
<h3>Read Preference<a class="headerlink" href="#read-preference" title="Permalink to this headline">¶</a></h3>
<p><a class="reference internal" href="../core/transactions.html"><span class="doc">Multi-document transactions</span></a> that contain
read operations must use read preference <a class="reference internal" href="../core/read-preference.html#primary" title="primary"><code class="xref mongodb mongodb-readmode docutils literal"><span class="pre">primary</span></code></a>. All
operations in a given transaction must route to the same member.</p>
</div>
<div class="section" id="commands">
<h3>Commands<a class="headerlink" href="#commands" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><dl class="first docutils">
<dt><a class="reference internal" href="../reference/command/abortTransaction.html#dbcmd.abortTransaction" title="abortTransaction"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">abortTransaction</span></code></a></dt>
<dd>Use the corresponding driver method or <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell
helper <a class="reference internal" href="../reference/method/Session.abortTransaction.html#Session.abortTransaction" title="Session.abortTransaction()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">Session.abortTransaction()</span></code></a> instead.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference internal" href="../reference/command/commitTransaction.html#dbcmd.commitTransaction" title="commitTransaction"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">commitTransaction</span></code></a></dt>
<dd>Use the corresponding driver method or <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell
helper <a class="reference internal" href="../reference/method/Session.commitTransaction.html#Session.commitTransaction" title="Session.commitTransaction()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">Session.commitTransaction()</span></code></a> instead.</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="locks">
<h3>Locks<a class="headerlink" href="#locks" title="Permalink to this headline">¶</a></h3>
<p>By default, <a class="reference internal" href="../core/transactions.html"><span class="doc">multi-document transactions</span></a>
wait <code class="docutils literal"><span class="pre">5</span></code> milliseconds to acquire locks required by the operations in
the transaction. If the transaction cannot acquire its required locks
with the <code class="docutils literal"><span class="pre">5</span></code> milliseconds, the transaction aborts.</p>
<p>You can use the <a class="reference internal" href="../reference/parameters.html#param.maxTransactionLockRequestTimeoutMillis" title="maxTransactionLockRequestTimeoutMillis"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">maxTransactionLockRequestTimeoutMillis</span></code></a>
parameter to adjust how long transactions wait to acquire locks.</p>
<p>Transactions release all locks upon abort or commit.</p>
</div>
<div class="section" id="currentop">
<h3><code class="docutils literal"><span class="pre">$currentOp</span></code><a class="headerlink" href="#currentop" title="Permalink to this headline">¶</a></h3>
<p>The aggregation pipeline stage <a class="reference internal" href="../reference/operator/aggregation/currentOp.html#pipe._S_currentOp" title="$currentOp"><code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$currentOp</span></code></a> (and the
<a class="reference internal" href="../reference/command/currentOp.html#dbcmd.currentOp" title="currentOp"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">currentOp</span></code></a> command and <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell helper
<a class="reference internal" href="../reference/method/db.currentOp.html#db.currentOp" title="db.currentOp()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.currentOp()</span></code></a> method) return information on inactive sessions
which are holding locks as part of a transaction.</p>
</div>
<div class="section" id="parameters">
<h3>Parameters<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="../reference/parameters.html#param.transactionLifetimeLimitSeconds" title="transactionLifetimeLimitSeconds"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">transactionLifetimeLimitSeconds</span></code></a> to specify the lifetime
for a <a class="reference internal" href="../core/transactions.html"><span class="doc">multi-document transaction</span></a> after
which the transaction is considered expired and will be aborted when
the periodic cleanup process next runs.</li>
<li><a class="reference internal" href="../reference/parameters.html#param.maxTransactionLockRequestTimeoutMillis" title="maxTransactionLockRequestTimeoutMillis"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">maxTransactionLockRequestTimeoutMillis</span></code></a> to specify how
long <a class="reference internal" href="../core/transactions.html"><span class="doc">multi-document transactions</span></a> should
wait to aquire locks required by the operations in the transaction.</li>
</ul>
</div>
</div>
<div class="section" id="aggregation">
<h2>Aggregation<a class="headerlink" href="#aggregation" title="Permalink to this headline">¶</a></h2>
<div class="section" id="new-type-conversion-operators">
<span id="agg-type-conversion"></span><h3>New  Type Conversion Operators<a class="headerlink" href="#new-type-conversion-operators" title="Permalink to this headline">¶</a></h3>
<p>MongoDB 4.0 adds the following new aggregation operators for type
conversion:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operator</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="../reference/operator/aggregation/convert.html#exp._S_convert" title="$convert"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$convert</span></code></a></td>
<td>Convert value to specified type.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/operator/aggregation/toBool.html#exp._S_toBool" title="$toBool"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toBool</span></code></a></td>
<td>Convert value to boolean.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/operator/aggregation/toDate.html#exp._S_toDate" title="$toDate"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toDate</span></code></a></td>
<td>Convert value to Date.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/operator/aggregation/toDecimal.html#exp._S_toDecimal" title="$toDecimal"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toDecimal</span></code></a></td>
<td>Convert value to Decimal128.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/operator/aggregation/toDouble.html#exp._S_toDouble" title="$toDouble"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toDouble</span></code></a></td>
<td>Convert value to Double.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/operator/aggregation/toInt.html#exp._S_toInt" title="$toInt"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toInt</span></code></a></td>
<td>Convert value to integer.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/operator/aggregation/toLong.html#exp._S_toLong" title="$toLong"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toLong</span></code></a></td>
<td>Convert value to long.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/operator/aggregation/toObjectId.html#exp._S_toObjectId" title="$toObjectId"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toObjectId</span></code></a></td>
<td>Convert value to ObjectId.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/operator/aggregation/toString.html#exp._S_toString" title="$toString"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$toString</span></code></a></td>
<td>Convert value to string.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="new-string-operators">
<h3>New String Operators<a class="headerlink" href="#new-string-operators" title="Permalink to this headline">¶</a></h3>
<p>MongoDB 4.0 adds the following new aggregation string operators:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="20%" />
<col width="80%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Operator</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="../reference/operator/aggregation/ltrim.html#exp._S_ltrim" title="$ltrim"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$ltrim</span></code></a></td>
<td>Removes whitespace or the specified characters from the
beginning of a string.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/operator/aggregation/rtrim.html#exp._S_rtrim" title="$rtrim"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$rtrim</span></code></a></td>
<td>Removes whitespace or the specified characters from the end of a
string.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/operator/aggregation/trim.html#exp._S_trim" title="$trim"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$trim</span></code></a></td>
<td>Removes whitespace or the specified characters from the
beginning and end of a string.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="additional-improvements">
<h3>Additional Improvements<a class="headerlink" href="#additional-improvements" title="Permalink to this headline">¶</a></h3>
<div class="section" id="bucket">
<span id="id18"></span><h4><code class="docutils literal"><span class="pre">$bucket</span></code><a class="headerlink" href="#bucket" title="Permalink to this headline">¶</a></h4>
<p>The <a class="reference internal" href="../reference/operator/aggregation/bucket.html#pipe._S_bucket" title="$bucket"><code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$bucket</span></code></a> stage no longer requires <code class="docutils literal"><span class="pre">boundaries</span></code>
document arguments to be wrapped in <code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$literal</span></code>.</p>
</div>
<div class="section" id="datetostring">
<span id="id19"></span><h4><code class="docutils literal"><span class="pre">$dateToString</span></code><a class="headerlink" href="#datetostring" title="Permalink to this headline">¶</a></h4>
<p>The <a class="reference internal" href="../reference/operator/aggregation/dateToString.html#exp._S_dateToString" title="$dateToString"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$dateToString</span></code></a> aggregation operator has the following
option changes:</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Requires <code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> (fcv) set to <code class="docutils literal"><span class="pre">&quot;4.0&quot;</span></code> or greater.</p>
</div>
<ul class="simple">
<li>A new option <code class="docutils literal"><span class="pre">onNull</span></code> specifies the value to return if the <code class="docutils literal"><span class="pre">date</span></code>
is null or missing.</li>
<li>The option <code class="docutils literal"><span class="pre">format</span></code> is now optional.</li>
</ul>
</div>
<div class="section" id="datefromparts">
<h4><code class="docutils literal"><span class="pre">$dateFromParts</span></code><a class="headerlink" href="#datefromparts" title="Permalink to this headline">¶</a></h4>
<p>If the value specified for fields other than <code class="docutils literal"><span class="pre">year</span></code>, <code class="docutils literal"><span class="pre">isoYear</span></code>, and
<code class="docutils literal"><span class="pre">timezone</span></code> is outside the valid range, <a class="reference internal" href="../reference/operator/aggregation/dateFromParts.html#exp._S_dateFromParts" title="$dateFromParts"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$dateFromParts</span></code></a>
carries or subtracts the difference from other date parts to calculate
the date. For more information, see <a class="reference internal" href="../reference/operator/aggregation/dateFromParts.html#datefromparts-values"><span class="std std-ref">Value Range</span></a>.</p>
</div>
<div class="section" id="datefromstring">
<span id="id20"></span><h4><code class="docutils literal"><span class="pre">$dateFromString</span></code><a class="headerlink" href="#datefromstring" title="Permalink to this headline">¶</a></h4>
<p>The <a class="reference internal" href="../reference/operator/aggregation/dateFromString.html#exp._S_dateFromString" title="$dateFromString"><code class="xref mongodb mongodb-expression docutils literal"><span class="pre">$dateFromString</span></code></a> aggregation operator takes an
optional <code class="docutils literal"><span class="pre">format</span></code> field.</p>
</div>
</div>
<div class="section" id="id21">
<h3><code class="docutils literal"><span class="pre">$currentOp</span></code><a class="headerlink" href="#id21" title="Permalink to this headline">¶</a></h3>
<p>The aggregation pipeline stage <a class="reference internal" href="../reference/operator/aggregation/currentOp.html#pipe._S_currentOp" title="$currentOp"><code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$currentOp</span></code></a> supports the
following new options:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">idleSessions</span></code> option to return information on inactive sessions
which are holding locks as part of a transaction.</li>
<li><code class="docutils literal"><span class="pre">localOps</span></code> option to report operations that are running locally on
the current <a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instance, rather than reporting
operations that are running on the shards.</li>
</ul>
</div>
</div>
<div class="section" id="drivers">
<span id="id22"></span><h2>MongoDB Drivers<a class="headerlink" href="#drivers" title="Permalink to this headline">¶</a></h2>
<p>The following drivers are feature compatible with MongoDB 4.0:</p>
<table class="hlist"><tr><td><ul class="simple">
<li>Java 3.8.0</li>
<li>Python 3.7.0</li>
<li>C 1.11.0</li>
</ul>
</td><td><ul class="simple">
<li>C# 2.7</li>
<li>Node 3.1.0</li>
<li>Ruby 2.6.0</li>
</ul>
</td><td><ul class="simple">
<li>Perl 2.0.0</li>
<li>PHP (PHPC) 1.5.0</li>
<li>Scala 2.4.0</li>
</ul>
</td></tr></table>
</div>
<div class="section" id="security">
<h2>Security<a class="headerlink" href="#security" title="Permalink to this headline">¶</a></h2>
<div class="section" id="add-support-for-scram-sha-256">
<span id="scram-sha-256"></span><h3>Add Support for <code class="docutils literal"><span class="pre">SCRAM-SHA-256</span></code><a class="headerlink" href="#add-support-for-scram-sha-256" title="Permalink to this headline">¶</a></h3>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">To use <a class="reference internal" href="../core/security-scram.html#authentication-scram-sha-256"><span class="std std-ref">SCRAM-SHA-256</span></a>, the
<code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> must be set to <code class="docutils literal"><span class="pre">4.0</span></code>. For more
information on featureCompatibilityVersion, see <a class="reference internal" href="../reference/command/setFeatureCompatibilityVersion.html#view-fcv"><span class="std std-ref">View FeatureCompatibilityVersion</span></a> and
<a class="reference internal" href="../reference/command/setFeatureCompatibilityVersion.html#dbcmd.setFeatureCompatibilityVersion" title="setFeatureCompatibilityVersion"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setFeatureCompatibilityVersion</span></code></a>.</p>
</div>
<p>MongoDB adds support for <a class="reference internal" href="../core/security-scram.html#authentication-scram"><span class="std std-ref">SCRAM</span></a> authentication
mechanism <a class="reference internal" href="../core/security-scram.html#scram-mechanisms"><span class="std std-ref">SCRAM-SHA-256</span></a>, which uses the SHA-256
hash function. To modify the iteration count for <code class="docutils literal"><span class="pre">SCRAM-SHA-256</span></code>,
MongoDB adds a new parameter <a class="reference internal" href="../reference/parameters.html#param.scramSHA256IterationCount" title="scramSHA256IterationCount"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">scramSHA256IterationCount</span></code></a>.</p>
<div class="section" id="new-option-for-create-and-update-user-operations">
<h4>New Option for Create and Update User Operations<a class="headerlink" href="#new-option-for-create-and-update-user-operations" title="Permalink to this headline">¶</a></h4>
<p>When creating or updating a SCRAM user, you can indicate the specific
SCRAM mechanism or mechanisms to use for the user credentials.
Specifically, MongoDB 4.0 adds the <code class="docutils literal"><span class="pre">mechanisms</span></code> option to the
following commands and <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell helpers:</p>
<table border="1" class="docutils">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Command</th>
<th class="head">Method</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="../reference/command/createUser.html#dbcmd.createUser" title="createUser"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">createUser</span></code></a></td>
<td><a class="reference internal" href="../reference/method/db.createUser.html#db.createUser" title="db.createUser()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.createUser()</span></code></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/command/updateUser.html#dbcmd.updateUser" title="updateUser"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">updateUser</span></code></a></td>
<td><a class="reference internal" href="../reference/method/db.updateUser.html#db.updateUser" title="db.updateUser()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.updateUser()</span></code></a></td>
</tr>
</tbody>
</table>
<p>When using <code class="docutils literal"><span class="pre">SCRAM-SHA-256</span></code>, MongoDB (i.e. the server) requires
undigested password. Starting in MongoDB 4.0, the default value of
<code class="docutils literal"><span class="pre">digestPassword</span></code> is <code class="docutils literal"><span class="pre">true</span></code> for <a class="reference internal" href="../reference/command/createUser.html#dbcmd.createUser" title="createUser"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">createUser</span></code></a>, and the
default value of <code class="docutils literal"><span class="pre">passwordDigestor</span></code> is <code class="docutils literal"><span class="pre">&quot;server&quot;</span></code>. In earlier
MongoDB versions, <code class="docutils literal"><span class="pre">digestPassword</span></code> is <code class="docutils literal"><span class="pre">false</span></code> and <code class="docutils literal"><span class="pre">client</span></code>
respectively.</p>
</div>
<div class="section" id="new-option-for-ismaster-command">
<h4>New Option for <code class="docutils literal"><span class="pre">isMaster</span></code> Command<a class="headerlink" href="#new-option-for-ismaster-command" title="Permalink to this headline">¶</a></h4>
<p>Starting in MongoDB 4.0, the <a class="reference internal" href="../reference/command/isMaster.html#dbcmd.isMaster" title="isMaster"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">isMaster</span></code></a> command accepts an
optional field <code class="docutils literal"><span class="pre">saslSupportedMechs:</span> <span class="pre">&lt;db.user&gt;</span></code> to return an
additional field <a class="reference internal" href="../reference/command/isMaster.html#isMaster.saslSupportedMechs" title="isMaster.saslSupportedMechs"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">isMaster.saslSupportedMechs</span></code></a> in its result.</p>
<p><a class="reference internal" href="../reference/command/isMaster.html#isMaster.saslSupportedMechs" title="isMaster.saslSupportedMechs"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">isMaster.saslSupportedMechs</span></code></a> is an array of SASL mechanisms used
to create the specified user’s credentials.</p>
</div>
</div>
<div class="section" id="remove-support-for-mongodb-cr">
<span id="mongodb-cr"></span><h3>Remove Support for <code class="docutils literal"><span class="pre">MONGODB-CR</span></code><a class="headerlink" href="#remove-support-for-mongodb-cr" title="Permalink to this headline">¶</a></h3>
<p>Starting in version 4.0, MongoDB removes support for the deprecated
MongoDB Challenge-Response (<code class="docutils literal"><span class="pre">MONGODB-CR</span></code>) authentication mechanism.</p>
<p>Since version 3.0, MongoDB has not supported the creation of
<code class="docutils literal"><span class="pre">MONGODB-CR</span></code> users unless the deployment had been upgraded from a 2.6
or earlier deployment that already had <code class="docutils literal"><span class="pre">MONGODB-CR</span></code> users and had not
upgraded the authentication schema.</p>
<p>If your deployment has user credentials stored in <code class="docutils literal"><span class="pre">MONGODB-CR</span></code>
schema, you must upgrade to <a class="reference internal" href="../core/security-scram.html#authentication-scram"><span class="std std-ref">Salted Challenge Response
Authentication Mechanism (SCRAM)</span></a> <strong>before</strong> you
upgrade to version 4.0. For information on upgrading to <code class="docutils literal"><span class="pre">SCRAM</span></code>, see
<a class="reference internal" href="3.0-scram.html"><span class="doc">Upgrade to SCRAM</span></a>.</p>
</div>
<div class="section" id="usersinfo-enhancement">
<h3><code class="docutils literal"><span class="pre">usersInfo</span></code> Enhancement<a class="headerlink" href="#usersinfo-enhancement" title="Permalink to this headline">¶</a></h3>
<p>The <a class="reference internal" href="../reference/command/usersInfo.html#dbcmd.usersInfo" title="usersInfo"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">usersInfo</span></code></a> command can return information across all databases
by specifying:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span> <span class="nx">usersInfo</span><span class="o">:</span> <span class="p">{</span> <span class="nx">forAllDBs</span><span class="o">:</span> <span class="kc">true</span> <span class="p">}</span> <span class="p">}</span>
</pre></div>
</div>
</div>
<p>The <a class="reference internal" href="../reference/command/usersInfo.html#dbcmd.usersInfo" title="usersInfo"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">usersInfo</span></code></a> and the <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell helpers
<a class="reference internal" href="../reference/method/db.getUser.html#db.getUser" title="db.getUser()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.getUser()</span></code></a> and <a class="reference internal" href="../reference/method/db.getUsers.html#db.getUsers" title="db.getUsers()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.getUsers()</span></code></a> method accept a new
optional <code class="docutils literal"><span class="pre">filter</span></code> document. The filter document specifies
<a class="reference internal" href="../reference/operator/aggregation/match.html#pipe._S_match" title="$match"><code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$match</span></code></a> stage conditions to return information only for
users that match the conditions.</p>
<p>The <a class="reference internal" href="../reference/command/usersInfo.html#dbcmd.usersInfo" title="usersInfo"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">usersInfo</span></code></a> command and the <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell helpers
<a class="reference internal" href="../reference/method/db.getUser.html#db.getUser" title="db.getUser()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.getUser()</span></code></a> and <a class="reference internal" href="../reference/method/db.getUsers.html#db.getUsers" title="db.getUsers()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.getUsers()</span></code></a> method return the
<code class="docutils literal"><span class="pre">mechanisms</span></code> field for the user.</p>
</div>
<div class="section" id="tls-ssl">
<span id="tls"></span><h3>TLS/SSL<a class="headerlink" href="#tls-ssl" title="Permalink to this headline">¶</a></h3>
<p>Starting in version 4.0, MongoDB uses the native TLS/SSL OS libraries:</p>
<table border="1" class="docutils">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Windows</td>
<td>Secure Channel (Schannel)</td>
</tr>
<tr class="row-even"><td>Linux/BSD</td>
<td>OpenSSL</td>
</tr>
<tr class="row-odd"><td>macOS</td>
<td>Secure Transport</td>
</tr>
</tbody>
</table>
<p>Associated with this change, the parameter
<a class="reference internal" href="../reference/parameters.html#param.opensslCipherConfig" title="opensslCipherConfig"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">opensslCipherConfig</span></code></a> is supported for Linux/BSD and no
longer supported in Windows and macOS.</p>
<div class="section" id="tls-1-2-support">
<h4>TLS 1.2 Support<a class="headerlink" href="#tls-1-2-support" title="Permalink to this headline">¶</a></h4>
<p>MongoDB 4.0 binaries for macOS support TLS 1.2.</p>
</div>
<div class="section" id="disable-tls-1-0">
<span id="disable-tls"></span><h4>Disable TLS 1.0<a class="headerlink" href="#disable-tls-1-0" title="Permalink to this headline">¶</a></h4>
<p>MongoDB binaries (<a class="reference internal" href="../reference/program/mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>, <a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>, and
<a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a>) disables support for TLS 1.0 encryption on
systems where TLS 1.1+ is available.</p>
<p>If you need to support TLS 1.0:</p>
<ul>
<li><p class="first">For <a class="reference internal" href="../reference/program/mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> instances, you can specify <code class="docutils literal"><span class="pre">none</span></code> to
<a class="reference internal" href="../reference/configuration-options.html#net.ssl.disabledProtocols" title="net.ssl.disabledProtocols"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.ssl.disabledProtocols</span></code></a> or
<a class="reference internal" href="../reference/program/mongod.html#cmdoption-mongod-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span> <span class="pre">none</span></code></a>.</p>
</li>
<li><p class="first">For <a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> instances, you can specify <code class="docutils literal"><span class="pre">none</span></code> to
<a class="reference internal" href="../reference/configuration-options.html#net.ssl.disabledProtocols" title="net.ssl.disabledProtocols"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.ssl.disabledProtocols</span></code></a> or
<a class="reference internal" href="../reference/program/mongos.html#cmdoption-mongos-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span> <span class="pre">none</span></code></a>.</p>
</li>
<li><p class="first">For the <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell, you can specify
<a class="reference internal" href="../reference/program/mongo.html#cmdoption-mongo-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span> <span class="pre">none</span></code></a>.</p>
<p>The <a class="reference internal" href="../reference/program/mongo.html#cmdoption-mongo-ssldisabledprotocols"><code class="xref std std-option docutils literal"><span class="pre">--sslDisabledProtocols</span></code></a>
option is available for the <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell in:</p>
<ul class="simple">
<li>MongoDB version 4.0+</li>
<li>MongoDB version 3.6.5+</li>
<li>MongoDB version 3.4.15+</li>
</ul>
</li>
</ul>
<p>On macOS, to connect <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell version 3.6.4 or
earlier to a MongoDB 4.0+ deployment requires explicit enabling of TLS
1.0.</p>
</div>
</div>
<div class="section" id="aes-gcm">
<h3>AES-GCM<a class="headerlink" href="#aes-gcm" title="Permalink to this headline">¶</a></h3>
<p>MongoDB Enterprise on Windows no longer supports <code class="docutils literal"><span class="pre">AES256-GCM</span></code>. This
cipher is now available only on Linux.</p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#ssl-systemstore"><span class="std std-ref">Enable System Store for TLS/SSL on Windows and macOS</span></a></p>
</div>
</div>
<div class="section" id="new-privilege-actions">
<h3>New Privilege Actions<a class="headerlink" href="#new-privilege-actions" title="Permalink to this headline">¶</a></h3>
<p>To support <a class="reference internal" href="#free-monitoring"><span class="std std-ref">free Cloud monitoring</span></a>, MongoDB
adds the following privilege actions available for the <code class="docutils literal"><span class="pre">cluster</span></code>
resource:</p>
<ul class="simple">
<li><a class="reference internal" href="../reference/privilege-actions.html#checkFreeMonitoringStatus" title="checkFreeMonitoringStatus"><code class="xref mongodb mongodb-authaction docutils literal"><span class="pre">checkFreeMonitoringStatus</span></code></a></li>
<li><a class="reference internal" href="../reference/privilege-actions.html#setFreeMonitoring" title="setFreeMonitoring"><code class="xref mongodb mongodb-authaction docutils literal"><span class="pre">setFreeMonitoring</span></code></a></li>
</ul>
<p>MongoDB modifies the <a class="reference internal" href="../reference/built-in-roles.html#clusterMonitor" title="clusterMonitor"><code class="xref mongodb mongodb-authrole docutils literal"><span class="pre">clusterMonitor</span></code></a> role to include these
privileges.</p>
</div>
<div class="section" id="x-509-authentication-certificate-restrictions">
<h3>x.509 Authentication Certificate Restrictions<a class="headerlink" href="#x-509-authentication-certificate-restrictions" title="Permalink to this headline">¶</a></h3>
<p>Starting in MongoDB 4.0, if you specify
<code class="docutils literal"><span class="pre">--sslAllowInvalidCertificates</span></code> or
<code class="docutils literal"><span class="pre">net.ssl.allowInvalidCertificates:</span> <span class="pre">true</span></code> (or in MongoDB 4.2, the
alias <code class="docutils literal"><span class="pre">--tlsAllowInvalidateCertificates</span></code> or
<code class="docutils literal"><span class="pre">net.tls.allowInvalidCertificates:</span> <span class="pre">true</span></code>) when using x.509
authentication, an invalid certificate is only sufficient to
establish a TLS/SSL connection but is <em>insufficient</em> for
authentication.</p>
<p>If you are using invalid certificates to perform x.509 authentication,
update your certificates to valid certificates. For example, you may
sign your existing certificates with a trusted CA, or if using a custom
CA, specify that CA using <a class="reference internal" href="../reference/configuration-options.html#net.ssl.CAFile" title="net.ssl.CAFile"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">net.ssl.CAFile</span></code></a>.</p>
</div>
<div class="section" id="enable-system-store-for-tls-ssl-on-windows-and-macos">
<span id="ssl-systemstore"></span><h3>Enable System Store for TLS/SSL on Windows and macOS<a class="headerlink" href="#enable-system-store-for-tls-ssl-on-windows-and-macos" title="Permalink to this headline">¶</a></h3>
<p>The <a class="reference internal" href="../reference/program/mongod.html#cmdoption-mongod-sslcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslCertificateSelector</span></code></a>
option (<a class="reference internal" href="../reference/configuration-options.html#net.ssl.certificateSelector" title="net.ssl.certificateSelector"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">certificateSelector</span></code></a> setting) allows
<a class="reference internal" href="../reference/program/mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>, <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell and
<a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> to use system SSL certificate stores for Windows
and macOS.</p>
<p>The <a class="reference internal" href="../reference/program/mongod.html#cmdoption-mongod-sslclustercertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--sslClusterCertificateSelector</span></code></a> option
(<a class="reference internal" href="../reference/configuration-options.html#net.ssl.clusterCertificateSelector" title="net.ssl.clusterCertificateSelector"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">clusterCertificateSelector</span></code></a> setting) allows
<a class="reference internal" href="../reference/program/mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> and
<a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> to use system TLS/SSL certificate stores for Windows
and macOS for internal TLS/SSL communication within a cluster.</p>
<p>The option <a class="reference internal" href="../reference/program/mongod.html#cmdoption-mongod-kmipclientcertificateselector"><code class="xref std std-option docutils literal"><span class="pre">--kmipClientCertificateSelector</span></code></a>
(<a class="reference internal" href="../reference/configuration-options.html#security.kmip.clientCertificateSelector" title="security.kmip.clientCertificateSelector"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">security.kmip.clientCertificateSelector</span></code></a>) allows
<a class="reference internal" href="../reference/program/mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a> and <a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> to use system TLS/SSL
certificate stores for Windows and macOS when using TLS/SSL connection to the
KMIP server.</p>
</div>
</div>
<div class="section" id="deprecate-mmapv1">
<span id="id23"></span><h2>Deprecate MMAPv1<a class="headerlink" href="#deprecate-mmapv1" title="Permalink to this headline">¶</a></h2>
<p>Starting in version 4.0, MongoDB deprecates the MMAPv1 storage Engine
and will remove MMAPv1 in a future release.</p>
<p>To change your MMAPv1 storage engine deployment to
<a class="reference internal" href="../core/wiredtiger.html"><span class="doc">WiredTiger Storage Engine</span></a>, see:</p>
<ul class="simple">
<li><a class="reference internal" href="../tutorial/change-standalone-wiredtiger.html"><span class="doc">Change Standalone to WiredTiger</span></a></li>
<li><a class="reference internal" href="../tutorial/change-replica-set-wiredtiger.html"><span class="doc">Change Replica Set to WiredTiger</span></a></li>
<li><a class="reference internal" href="../tutorial/change-sharded-cluster-wiredtiger.html"><span class="doc">Change Sharded Cluster to WiredTiger</span></a></li>
</ul>
</div>
<div class="section" id="replica-set">
<h2>Replica Set<a class="headerlink" href="#replica-set" title="Permalink to this headline">¶</a></h2>
<div class="section" id="remove-pv0-for-replica-sets">
<span id="remove-pv0"></span><h3>Remove <code class="docutils literal"><span class="pre">pv0</span></code> for Replica Sets<a class="headerlink" href="#remove-pv0-for-replica-sets" title="Permalink to this headline">¶</a></h3>
<p>MongoDB 4.0 removes the deprecated replica set protocol version 0
<code class="docutils literal"><span class="pre">pv0</span></code>.</p>
<p>Before upgrading to MongoDB 4.0, you must upgrade to <a class="reference internal" href="../reference/replica-configuration.html#rsconf.protocolVersion" title="protocolVersion"><code class="xref mongodb mongodb-rsconf docutils literal"><span class="pre">pv1</span></code></a>.</p>
<p>To upgrade to <code class="docutils literal"><span class="pre">pv1</span></code>, connect a <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell to the
replica set primary and perform the following sequence of operations:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-sh"><div class="highlight"><pre><span></span><span class="nv">cfg</span> <span class="o">=</span> rs.conf<span class="o">()</span><span class="p">;</span>
cfg.protocolVersion<span class="o">=</span><span class="m">1</span><span class="p">;</span>
rs.reconfig<span class="o">(</span>cfg<span class="o">)</span><span class="p">;</span>
</pre></div>
</div>
</div>
<p>You can use <a class="reference internal" href="../reference/replica-configuration.html#rsconf.settings.catchUpTimeoutMillis" title="settings.catchUpTimeoutMillis"><code class="xref mongodb mongodb-rsconf docutils literal"><span class="pre">catchUpTimeoutMillis</span></code></a> to prioritize
between faster failovers and preservation of <a class="reference internal" href="../reference/write-concern.html#writeconcern.&lt;number&gt;" title="&lt;number&gt;"><code class="xref mongodb mongodb-writeconcern docutils literal"><span class="pre">w:1</span></code></a> writes.</p>
<p>For more information on <code class="docutils literal"><span class="pre">pv1</span></code>, see
<a class="reference internal" href="../reference/replica-set-protocol-versions.html"><span class="doc">Replica Set Protocol Version</span></a>.</p>
</div>
<div class="section" id="remove-master-slave-replication">
<span id="remove-master-slave"></span><h3>Remove Master-Slave Replication<a class="headerlink" href="#remove-master-slave-replication" title="Permalink to this headline">¶</a></h3>
<p>MongoDB 4.0 removes support for the deprecated master-slave
replication. Before you can upgrade to MongoDB 4.0, if your deployment
uses master-slave replication, you must upgrade to a replica set.</p>
<p>To convert from master-slave replication to a replica set, see
<a class="reference external" href="https://docs.mongodb.com/v4.0/core/master-slave">Convert a Master-Slave Deployment to a Replica Set</a>.</p>
</div>
<div class="section" id="journaling-and-replica-sets">
<h3>Journaling and Replica Sets<a class="headerlink" href="#journaling-and-replica-sets" title="Permalink to this headline">¶</a></h3>
<p>Starting in MongoDB 4.0, you cannot specify <a class="reference internal" href="../reference/program/mongod.html#cmdoption-mongod-nojournal"><code class="xref std std-option docutils literal"><span class="pre">--nojournal</span></code></a> option or <a class="reference internal" href="../reference/configuration-options.html#storage.journal.enabled" title="storage.journal.enabled"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">storage.journal.enabled:</span>
<span class="pre">false</span></code></a> for replica set members that use the
WiredTiger storage engine.</p>
</div>
<div class="section" id="rollbacktimelimitsecs-parameter-available">
<h3><code class="docutils literal"><span class="pre">rollbackTimeLimitSecs</span></code> Parameter Available<a class="headerlink" href="#rollbacktimelimitsecs-parameter-available" title="Permalink to this headline">¶</a></h3>
<p>Starting in MongoDB 4.0, a new <a class="reference internal" href="../reference/parameters.html#param.rollbackTimeLimitSecs" title="rollbackTimeLimitSecs"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">rollbackTimeLimitSecs</span></code></a>
parameter allows for the setting of the time limit in seconds between
the common point and the last oplog write entry for the member
indicated for rollback. The default rollback time limit is 1 day.</p>
</div>
<div class="section" id="wait-for-background-index-builds">
<h3>Wait for Background Index Builds<a class="headerlink" href="#wait-for-background-index-builds" title="Permalink to this headline">¶</a></h3>
<p>Starting in version 4.0, MongoDB waits for any in-progress
<a class="reference internal" href="../core/index-creation.html#index-creation-background"><span class="std std-ref">background index builds</span></a> to finish
before starting a <a class="reference internal" href="../core/replica-set-rollbacks.html"><span class="doc">rollback</span></a>.</p>
</div>
<div class="section" id="rollback-files">
<h3>Rollback Files<a class="headerlink" href="#rollback-files" title="Permalink to this headline">¶</a></h3>
<p>MongoDB adds the parameter <a class="reference internal" href="../reference/parameters.html#param.createRollbackDataFiles" title="createRollbackDataFiles"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">createRollbackDataFiles</span></code></a> that
determines whether during a rollback, MongoDB creates rollback files
that contains documents affected during the rollback.</p>
</div>
<div class="section" id="replsetgetstatus-output-changes">
<h3><code class="docutils literal"><span class="pre">replSetGetStatus</span></code> Output Changes<a class="headerlink" href="#replsetgetstatus-output-changes" title="Permalink to this headline">¶</a></h3>
<p>The <a class="reference internal" href="../reference/command/replSetGetStatus.html#dbcmd.replSetGetStatus" title="replSetGetStatus"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">replSetGetStatus</span></code></a> returns the following new fields:</p>
<ul class="simple">
<li><a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.syncSourceHost" title="replSetGetStatus.syncSourceHost"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">syncSourceHost</span></code></a></li>
<li><a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.syncSourceId" title="replSetGetStatus.syncSourceId"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">syncSourceId</span></code></a></li>
<li><a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.lastStableCheckpointTimestamp" title="replSetGetStatus.lastStableCheckpointTimestamp"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">lastStableCheckpointTimestamp</span></code></a></li>
<li><a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.members[n].syncSourceHost" title="replSetGetStatus.members[n].syncSourceHost"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">syncSourceHost</span></code></a></li>
<li><a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.members[n].syncSourceId" title="replSetGetStatus.members[n].syncSourceId"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">syncSourceId</span></code></a></li>
</ul>
<p>The following fields returned from <a class="reference internal" href="../reference/command/replSetGetStatus.html#dbcmd.replSetGetStatus" title="replSetGetStatus"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">replSetGetStatus</span></code></a> are
deprecated:</p>
<ul class="simple">
<li><a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.syncingTo" title="replSetGetStatus.syncingTo"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">replSetGetStatus.syncingTo</span></code></a></li>
<li><a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.members[n].syncingTo" title="replSetGetStatus.members[n].syncingTo"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">replSetGetStatus.members[n].syncingTo</span></code></a></li>
</ul>
</div>
<div class="section" id="oplog-size">
<h3>Oplog Size<a class="headerlink" href="#oplog-size" title="Permalink to this headline">¶</a></h3>
<p>Starting in MongoDB 4.0, the oplog can grow past its configured size
limit to avoid deleting the <a class="reference internal" href="../reference/command/replSetGetStatus.html#replSetGetStatus.optimes.lastCommittedOpTime" title="replSetGetStatus.optimes.lastCommittedOpTime"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">majority</span> <span class="pre">commit</span> <span class="pre">point</span></code></a>.</p>
</div>
</div>
<div class="section" id="change-streams">
<h2>Change Streams<a class="headerlink" href="#change-streams" title="Permalink to this headline">¶</a></h2>
<div class="section" id="database-and-deployment-change-streams">
<h3>Database and Deployment Change Streams<a class="headerlink" href="#database-and-deployment-change-streams" title="Permalink to this headline">¶</a></h3>
<p>MongoDB adds the ability to:</p>
<ul class="simple">
<li>Open a <a class="reference internal" href="../changeStreams.html#changestreams"><span class="std std-ref">change stream cursor</span></a> for a single
database (excluding <code class="docutils literal"><span class="pre">admin</span></code>, <code class="docutils literal"><span class="pre">local</span></code>, and <code class="docutils literal"><span class="pre">config</span></code> database) to
watch for changes to all its non-<code class="docutils literal"><span class="pre">system</span></code> collections.</li>
<li>Open a <a class="reference internal" href="../changeStreams.html#changestreams"><span class="std std-ref">change stream cursor</span></a> for a deployment
to watch for changes to all non-<code class="docutils literal"><span class="pre">system</span></code> collections across all
databases except for <code class="docutils literal"><span class="pre">admin</span></code>, <code class="docutils literal"><span class="pre">local</span></code>, and <code class="docutils literal"><span class="pre">config</span></code>.</li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Requires <code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> (fcv) set to <code class="docutils literal"><span class="pre">&quot;4.0&quot;</span></code> or greater.</p>
</div>
</div>
<div class="section" id="start-time-option">
<h3>Start Time Option<a class="headerlink" href="#start-time-option" title="Permalink to this headline">¶</a></h3>
<p>MongoDB adds the ability to specify a start time
(<code class="docutils literal"><span class="pre">startAtOperationTime</span></code> option) for a change stream.</p>
</div>
<div class="section" id="change-event-document-changes">
<h3>Change Event Document Changes<a class="headerlink" href="#change-event-document-changes" title="Permalink to this headline">¶</a></h3>
<p>The <a class="reference internal" href="../reference/change-events.html"><span class="doc">change event documents</span></a> include
the new fields:</p>
<ul class="simple">
<li>the <code class="docutils literal"><span class="pre">clusterTime</span></code> which corresponds to timestamp from the oplog
entry for the event.</li>
<li>the <code class="docutils literal"><span class="pre">txnNumber</span></code> and the <code class="docutils literal"><span class="pre">lsid</span></code> if the operation is part of a
<a class="reference internal" href="../core/transactions.html"><span class="doc">multi-document transaction</span></a>.</li>
</ul>
</div>
<div class="section" id="resume-token-data-type-change">
<span id="resume-token"></span><h3>Resume Token Data Type Change<a class="headerlink" href="#resume-token-data-type-change" title="Permalink to this headline">¶</a></h3>
<p>MongoDB 4.0 introduces new hex-encoded string <a class="reference internal" href="../changeStreams.html"><span class="doc">change streams</span></a> resume tokens:</p>
<p>The resume token <code class="docutils literal"><span class="pre">_data</span></code> type depends on the MongoDB versions and,
in some cases, the feature compatibility version (fcv) at the time
of the change stream’s opening/resumption (i.e. a change in fcv
value does not affect the resume tokens for already opened change
streams):</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="32%" />
<col width="39%" />
<col width="29%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">MongoDB Version</th>
<th class="head">Feature Compatibility Version</th>
<th class="head">Resume Token <code class="docutils literal"><span class="pre">_data</span></code> Type</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>MongoDB 4.0.7 and later</td>
<td>“4.0” or “3.6”</td>
<td>Hex-encoded string (<code class="docutils literal"><span class="pre">v1</span></code>)</td>
</tr>
<tr class="row-odd"><td>MongoDB 4.0.6 and earlier</td>
<td>“4.0”</td>
<td>Hex-encoded string (<code class="docutils literal"><span class="pre">v0</span></code>)</td>
</tr>
<tr class="row-even"><td>MongoDB 4.0.6 and earlier</td>
<td>“3.6”</td>
<td>BinData</td>
</tr>
<tr class="row-odd"><td>MongoDB 3.6</td>
<td>“3.6”</td>
<td>BinData</td>
</tr>
</tbody>
</table>
<p>With hex-encoded string resume tokens, you can compare and sort the
resume tokens.</p>
<p>Regardless of the fcv value, a 4.0 deployment can use
either BinData resume tokens or hex string resume tokens to resume a
change stream. As such, a 4.0 deployment can use a resume
token from a change stream opened on a collection from a 3.6
deployment.</p>
<p>New resume token formats introduced in a MongoDB version
cannot be consumed by earlier MongoDB versions.</p>
<p>A 3.6 deployment can, however, use the BinData resume token returned
from a change stream opened against a collection from a deployment
with fcv <code class="docutils literal"><span class="pre">3.6</span></code>. However, a 3.6 deployment cannot use the
hex-encoded string resume tokens.</p>
</div>
<div class="section" id="change-stream-methods">
<span id="id24"></span><h3><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods<a class="headerlink" href="#change-stream-methods" title="Permalink to this headline">¶</a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="50%" />
<col width="50%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Method</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="../reference/method/db.watch.html#db.watch" title="db.watch()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.watch()</span></code></a></td>
<td><p class="first">Opens a <a class="reference internal" href="../changeStreams.html#changestreams"><span class="std std-ref">change stream cursor</span></a> for a single database
(excluding <code class="docutils literal"><span class="pre">admin</span></code>, <code class="docutils literal"><span class="pre">local</span></code>, and <code class="docutils literal"><span class="pre">config</span></code> database) to
watch for changes to all its non-<code class="docutils literal"><span class="pre">system</span></code> collections.</p>
<p class="last">For the corresponding MongoDB driver method, refer to your
driver documentation.</p>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/method/Mongo.watch.html#Mongo.watch" title="Mongo.watch()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">Mongo.watch()</span></code></a></td>
<td><p class="first">Opens a <a class="reference internal" href="../changeStreams.html#changestreams"><span class="std std-ref">change stream cursor</span></a> for a
deployment to watch for changes to all non-<code class="docutils literal"><span class="pre">system</span></code>
collections across all databases except for <code class="docutils literal"><span class="pre">admin</span></code>,
<code class="docutils literal"><span class="pre">local</span></code>, and <code class="docutils literal"><span class="pre">config</span></code>.</p>
<p>For the corresponding MongoDB driver method, refer to your
driver documentation.</p>
<div class="last versionadded">
<p><span class="versionmodified">New in version 4.0.</span></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="free-monitoring">
<span id="id25"></span><h2>Free Monitoring<a class="headerlink" href="#free-monitoring" title="Permalink to this headline">¶</a></h2>
<p>MongoDB 4.0 (Community Edition) offers <a class="reference internal" href="../administration/free-monitoring.html"><span class="doc">free Cloud monitoring</span></a> for standalone or replica sets.</p>
<div class="section" id="enable-disable">
<h3>Enable/Disable<a class="headerlink" href="#enable-disable" title="Permalink to this headline">¶</a></h3>
<p>By default, you can enable/disable free monitoring during runtime
using:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="67%" />
<col width="33%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods</th>
<th class="head">Command</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><div class="first last line-block">
<div class="line"><a class="reference internal" href="../reference/method/db.enableFreeMonitoring.html#db.enableFreeMonitoring" title="db.enableFreeMonitoring()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.enableFreeMonitoring()</span></code></a></div>
<div class="line"><a class="reference internal" href="../reference/method/db.disableFreeMonitoring.html#db.disableFreeMonitoring" title="db.disableFreeMonitoring()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.disableFreeMonitoring()</span></code></a></div>
</div>
</td>
<td><a class="reference internal" href="../reference/command/setFreeMonitoring.html#dbcmd.setFreeMonitoring" title="setFreeMonitoring"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setFreeMonitoring</span></code></a></td>
</tr>
</tbody>
</table>
<p>You can also enable or disable free monitoring at startup using either:</p>
<ul class="simple">
<li>the configuration file setting <a class="reference internal" href="../reference/configuration-options.html#cloud.monitoring.free.state" title="cloud.monitoring.free.state"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">cloud.monitoring.free.state</span></code></a>
or</li>
<li>the command-line option <a class="reference internal" href="../reference/program/mongod.html#cmdoption-mongod-enablefreemonitoring"><code class="xref std std-option docutils literal"><span class="pre">--enableFreeMonitoring</span></code></a></li>
</ul>
</div>
<div class="section" id="view-status">
<h3>View Status<a class="headerlink" href="#view-status" title="Permalink to this headline">¶</a></h3>
<p>To view the state of your free monitoring, MongoDB provides the
following command and shell helper:</p>
<table border="1" class="colwidths-given docutils">
<colgroup>
<col width="67%" />
<col width="33%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head"><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods</th>
<th class="head">Command</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="../reference/method/db.getFreeMonitoringStatus.html#db.getFreeMonitoringStatus" title="db.getFreeMonitoringStatus()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.getFreeMonitoringStatus()</span></code></a></td>
<td><a class="reference internal" href="../reference/command/getFreeMonitoringStatus.html#dbcmd.getFreeMonitoringStatus" title="getFreeMonitoringStatus"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">getFreeMonitoringStatus</span></code></a></td>
</tr>
</tbody>
</table>
<p>The <a class="reference internal" href="../reference/command/serverStatus.html#dbcmd.serverStatus" title="serverStatus"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">serverStatus</span></code></a> and the helper
<code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.getServerStatus()</span></code> also includes free monitoring statistics
in the <a class="reference internal" href="../reference/command/serverStatus.html#serverstatus.freeMonitoring" title="freeMonitoring"><code class="xref mongodb mongodb-serverstatus docutils literal"><span class="pre">freeMonitoring</span></code></a> field.</p>
</div>
<div class="section" id="access-control">
<h3>Access Control<a class="headerlink" href="#access-control" title="Permalink to this headline">¶</a></h3>
<p>To support free Cloud monitoring, MongoDB adds the following privilege
actions available for the <code class="docutils literal"><span class="pre">cluster</span></code> resource:</p>
<ul class="simple">
<li><a class="reference internal" href="../reference/privilege-actions.html#checkFreeMonitoringStatus" title="checkFreeMonitoringStatus"><code class="xref mongodb mongodb-authaction docutils literal"><span class="pre">checkFreeMonitoringStatus</span></code></a></li>
<li><a class="reference internal" href="../reference/privilege-actions.html#setFreeMonitoring" title="setFreeMonitoring"><code class="xref mongodb mongodb-authaction docutils literal"><span class="pre">setFreeMonitoring</span></code></a></li>
</ul>
<p>The built-in role <a class="reference internal" href="../reference/built-in-roles.html#clusterMonitor" title="clusterMonitor"><code class="xref mongodb mongodb-authrole docutils literal"><span class="pre">clusterMonitor</span></code></a> includes the new privilege
actions.</p>
</div>
</div>
<div class="section" id="sharded-clusters">
<h2>Sharded Clusters<a class="headerlink" href="#sharded-clusters" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> uses <a class="reference internal" href="../reference/write-concern.html#writeconcern.&quot;majority&quot;" title="&quot;majority&quot;"><code class="xref mongodb mongodb-writeconcern docutils literal"><span class="pre">&quot;majority&quot;</span></code></a> write concern
for the following operations that affect the sharded cluster
metadata:</p>
<table border="1" class="docutils">
<colgroup>
<col width="33%" />
<col width="33%" />
<col width="33%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Command</th>
<th class="head">Method</th>
<th class="head">Note</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="../reference/command/addShard.html#dbcmd.addShard" title="addShard"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">addShard</span></code></a></td>
<td><a class="reference internal" href="../reference/method/sh.addShard.html#sh.addShard" title="sh.addShard()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">sh.addShard()</span></code></a></td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/command/create.html#dbcmd.create" title="create"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">create</span></code></a></td>
<td><a class="reference internal" href="../reference/method/db.createCollection.html#db.createCollection" title="db.createCollection()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.createCollection()</span></code></a></td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/command/drop.html#dbcmd.drop" title="drop"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">drop</span></code></a></td>
<td><a class="reference internal" href="../reference/method/db.collection.drop.html#db.collection.drop" title="db.collection.drop()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.collection.drop()</span></code></a></td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/command/dropDatabase.html#dbcmd.dropDatabase" title="dropDatabase"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">dropDatabase</span></code></a></td>
<td><a class="reference internal" href="../reference/method/db.dropDatabase.html#db.dropDatabase" title="db.dropDatabase()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.dropDatabase()</span></code></a></td>
<td>Changed in MongoDB 3.6</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/command/enableSharding.html#dbcmd.enableSharding" title="enableSharding"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">enableSharding</span></code></a></td>
<td><a class="reference internal" href="../reference/method/sh.enableSharding.html#sh.enableSharding" title="sh.enableSharding()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">sh.enableSharding()</span></code></a></td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/command/movePrimary.html#dbcmd.movePrimary" title="movePrimary"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">movePrimary</span></code></a></td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/command/renameCollection.html#dbcmd.renameCollection" title="renameCollection"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">renameCollection</span></code></a></td>
<td><a class="reference internal" href="../reference/method/db.collection.renameCollection.html#db.collection.renameCollection" title="db.collection.renameCollection()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.collection.renameCollection()</span></code></a></td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/command/shardCollection.html#dbcmd.shardCollection" title="shardCollection"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">shardCollection</span></code></a></td>
<td><a class="reference internal" href="../reference/method/sh.shardCollection.html#sh.shardCollection" title="sh.shardCollection()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">sh.shardCollection()</span></code></a></td>
<td>&#160;</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="../reference/command/removeShard.html#dbcmd.removeShard" title="removeShard"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">removeShard</span></code></a></td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="../reference/command/setFeatureCompatibilityVersion.html#dbcmd.setFeatureCompatibilityVersion" title="setFeatureCompatibilityVersion"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">setFeatureCompatibilityVersion</span></code></a></td>
<td>&#160;</td>
<td>&#160;</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="msi-installer-on-windows">
<h2><code class="docutils literal"><span class="pre">.msi</span></code> Installer on Windows<a class="headerlink" href="#msi-installer-on-windows" title="Permalink to this headline">¶</a></h2>
<p>Starting in MongoDB 4.0, you can configure and start MongoDB as a
service during the install.</p>
</div>
<div class="section" id="platform-support">
<h2>Platform Support<a class="headerlink" href="#platform-support" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>MongoDB 4.0 (Community &amp; Enterprise) adds support for:<ul>
<li><a class="reference internal" href="../tutorial/install-mongodb-on-amazon.html"><span class="doc">Amazon Linux 2</span></a></li>
<li><a class="reference internal" href="../tutorial/install-mongodb-on-debian.html"><span class="doc">Debian 9 “Stretch”</span></a></li>
<li><a class="reference internal" href="../tutorial/install-mongodb-on-ubuntu.html"><span class="doc">Ubuntu 18.04</span></a></li>
</ul>
</li>
<li>MongoDB 4.0 (Community) adds support for:<ul>
<li>s390x RHEL 6.x</li>
</ul>
</li>
<li>MongoDB 4.0 does not support SLES 11.<ul>
<li>Support for SLES 11 has also been removed in MongoDB 3.2.20+,
3.4.15+, and 3.6.4+.</li>
</ul>
</li>
<li>MongoDB 4.0 does not support Ubuntu 12.04.<ul>
<li>Support for Ubuntu 12.04 has also been removed in MongoDB 3.2.20+,
3.4.15+, and 3.6.4+.</li>
<li>Support for Ubuntu 12.04 has also been removed in MongoDB 3.2.20+,
3.4.15+, and 3.6.4+.</li>
</ul>
</li>
<li>In future releases, MongoDB will end support for the following
platforms:<ul>
<li>Windows 7/2008R2</li>
<li>Windows 8/2012</li>
<li>Windows 8.1/2012R2</li>
<li>Ubuntu 14.04</li>
</ul>
</li>
</ul>
<p>Refer to <a class="reference internal" href="../administration/production-notes.html#prod-notes-supported-platforms"><span class="std std-ref">Supported Platforms</span></a> for the full platform
support matrix.</p>
</div>
<div class="section" id="mongodb-tools">
<h2>MongoDB Tools<a class="headerlink" href="#mongodb-tools" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="../reference/program/mongoreplay.html#toolcommand.play" title="play"><code class="xref mongodb mongodb-toolcommand docutils literal"><span class="pre">mongoreplay</span> <span class="pre">play</span></code></a>  supports a new <code class="docutils literal"><span class="pre">MONGOREPLAY_HOST</span></code>
environment variable that specifies the MongoDB connection string when
running <code class="docutils literal"><span class="pre">mongoreplay</span> <span class="pre">play</span></code>. The new environment vairable can be used
instead of the command-line <a class="reference internal" href="../reference/program/mongoreplay.html#cmdoption-mongoreplay-play-host"><code class="xref std std-option docutils literal"><span class="pre">--host</span></code></a>
option.</p>
<p>For example, to play back a recording to a <a class="reference internal" href="../reference/program/mongod.html#bin.mongod" title="bin.mongod"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongod</span></code></a>
instance running with authentication <code class="docutils literal"><span class="pre">mongodb1.example.net:27017</span></code>, you can specify the connection string in:</p>
<ul>
<li><p class="first">The <code class="docutils literal"><span class="pre">MONGOREPLAY_HOST</span></code> environment variable:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-sh"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">MONGOREPLAY_HOST</span><span class="o">=</span><span class="s2">&quot;mongodb://myUserName:s0meD1fficultPassw0rd@mongodb1.example.net:27017/?authSource=admin&quot;</span>
mongoreplay play -p /some/path/to/my/recording.bson
</pre></div>
</div>
</div>
</li>
<li><p class="first">The <a class="reference internal" href="../reference/program/mongoreplay.html#cmdoption-mongoreplay-play-host"><code class="xref std std-option docutils literal"><span class="pre">--host</span></code></a> command-line option</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-sh"><div class="highlight"><pre><span></span>mongoreplay play -p /some/path/to/my/recording.bson --host <span class="s2">&quot;mongodb://myUserName:s0meD1fficultPassw0rd@mongodb1.example.net:27017/?authSource=admin&quot;</span>
</pre></div>
</div>
</div>
</li>
</ul>
<p>If <a class="reference internal" href="../reference/program/mongoreplay.html#cmdoption-mongoreplay-play-host"><code class="xref std std-option docutils literal"><span class="pre">--host</span></code></a> command-line option is
specified, the <a class="reference internal" href="../reference/program/mongoreplay.html#cmdoption-mongoreplay-play-host"><code class="xref std std-option docutils literal"><span class="pre">--host</span></code></a> value overrides
the environment variable.</p>
</div>
<div class="section" id="general-improvements">
<h2>General Improvements<a class="headerlink" href="#general-improvements" title="Permalink to this headline">¶</a></h2>
<div class="section" id="id26">
<h3>Commands<a class="headerlink" href="#id26" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>The command <a class="reference internal" href="../reference/command/listCollections.html#dbcmd.listCollections" title="listCollections"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">listCollections</span></code></a> takes Intent Shared lock on
the database. In previous versions, the command takes Shared lock on
the database.</li>
<li>The command <a class="reference internal" href="../reference/command/listCollections.html#dbcmd.listCollections" title="listCollections"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">listCollections</span></code></a> and its <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a>
shell helper <a class="reference internal" href="../reference/method/db.getCollectionInfos.html#db.getCollectionInfos" title="db.getCollectionInfos()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.getCollectionInfos()</span></code></a> accepts the following
option:<ul>
<li><code class="docutils literal"><span class="pre">nameOnly</span></code> to return only the collection names and types (which
does not require collection locks).</li>
<li><code class="docutils literal"><span class="pre">authorizedCollections</span></code> to allow users without the required
privilege to run <a class="reference internal" href="../reference/command/listCollections.html#dbcmd.listCollections" title="listCollections"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">listCollections</span></code></a> can run the command,
with <code class="docutils literal"><span class="pre">nameOnly:</span> <span class="pre">true,</span> <span class="pre">authorizedCollections:</span> <span class="pre">true</span></code>, to return the
the collection(s) to which the user has privileges.</li>
</ul>
</li>
<li>The command <a class="reference internal" href="../reference/command/serverStatus.html#dbcmd.serverStatus" title="serverStatus"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">serverStatus</span></code></a> and its <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a>
shell helper <a class="reference internal" href="../reference/method/db.serverStatus.html#db.serverStatus" title="db.serverStatus()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.serverStatus()</span></code></a> includes
<a class="reference internal" href="../reference/command/serverStatus.html#serverstatus.shardingStatistics" title="shardingStatistics"><code class="xref mongodb mongodb-serverstatus docutils literal"><span class="pre">shardingStatistics</span></code></a> in its output. The
<a class="reference internal" href="../reference/command/serverStatus.html#serverstatus.shardingStatistics" title="shardingStatistics"><code class="xref mongodb mongodb-serverstatus docutils literal"><span class="pre">shardingStatistics</span></code></a> includes data on metadata refresh
on sharded clusters.</li>
<li>The <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell helper <a class="reference internal" href="../reference/method/db.collection.drop.html#db.collection.drop" title="db.collection.drop()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.collection.drop()</span></code></a>
accepts the write concern option.</li>
<li>For cursors created inside a session, you cannot call
<a class="reference internal" href="../reference/command/getMore.html#dbcmd.getMore" title="getMore"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">getMore</span></code></a> outside the session. Similarly, for cursors
created outside of a session, you cannot call <a class="reference internal" href="../reference/command/getMore.html#dbcmd.getMore" title="getMore"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">getMore</span></code></a>
inside a session.</li>
<li>The command <a class="reference internal" href="../reference/command/dbHash.html#dbcmd.dbHash" title="dbHash"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">dbHash</span></code></a> includes the following fields in its
output:<ul>
<li><code class="docutils literal"><span class="pre">capped</span></code> field that lists the capped collections</li>
<li><code class="docutils literal"><span class="pre">uuids</span></code> field that contains the collections and their
corresponding UUIDs.</li>
</ul>
</li>
<li>The command <a class="reference internal" href="../reference/command/killOp.html#dbcmd.killOp" title="killOp"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">killOp</span></code></a> now supports termination of queries that are
running on a <a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a>. When run on the <code class="docutils literal"><span class="pre">mongos</span></code>, <a class="reference internal" href="../reference/command/killOp.html#dbcmd.killOp" title="killOp"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">killOp</span></code></a>
can kill queries that are running in more than one shard.</li>
</ul>
</div>
<div class="section" id="geospatial-query-improvements">
<h3>Geospatial Query Improvements<a class="headerlink" href="#geospatial-query-improvements" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>The geospatial query operators <a class="reference internal" href="../reference/operator/query/near.html#op._S_near" title="$near"><code class="xref mongodb mongodb-query docutils literal"><span class="pre">$near</span></code></a> and
<a class="reference internal" href="../reference/operator/query/nearSphere.html#op._S_nearSphere" title="$nearSphere"><code class="xref mongodb mongodb-query docutils literal"><span class="pre">$nearSphere</span></code></a> now supports querying on sharded collections.</li>
<li>As of MongoDB 4.0, the <a class="reference internal" href="../reference/operator/aggregation/geoNear.html#pipe._S_geoNear" title="$geoNear"><code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$geoNear</span></code></a> aggregation operator and
<code class="docutils literal"><span class="pre">geoNear</span></code> command support using the <code class="docutils literal"><span class="pre">minDistance</span></code> option
with <a class="reference internal" href="../core/2d.html"><span class="doc">2d</span></a> indexes. Similarly, <a class="reference internal" href="../reference/operator/query/near.html#op._S_near" title="$near"><code class="xref mongodb mongodb-query docutils literal"><span class="pre">$near</span></code></a> and
<a class="reference internal" href="../reference/operator/query/nearSphere.html#op._S_nearSphere" title="$nearSphere"><code class="xref mongodb mongodb-query docutils literal"><span class="pre">$nearSphere</span></code></a> support the <code class="docutils literal"><span class="pre">$minDistance</span></code> option for <a class="reference internal" href="../core/2d.html"><span class="doc">2d</span></a> indexes. Previously, <code class="docutils literal"><span class="pre">minDistance</span></code> and <code class="docutils literal"><span class="pre">$minDistance</span></code>
were only available for <a class="reference internal" href="../core/2dsphere.html"><span class="doc">2dsphere</span></a> indexes.</li>
<li>MongoDB 4.0 adds a <code class="docutils literal"><span class="pre">key</span></code> option for the <a class="reference internal" href="../reference/operator/aggregation/geoNear.html#pipe._S_geoNear" title="$geoNear"><code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$geoNear</span></code></a>
aggregation operator and <code class="docutils literal"><span class="pre">geoNear</span></code> command that enables
users to specify which geospatial index to use when querying a
collection with multiple geospatial indexes. Previously, to use the
<a class="reference internal" href="../reference/operator/aggregation/geoNear.html#pipe._S_geoNear" title="$geoNear"><code class="xref mongodb mongodb-pipeline docutils literal"><span class="pre">$geoNear</span></code></a> aggregation operator or <code class="docutils literal"><span class="pre">geoNear</span></code>
command, the collection could only have one geospatial index.</li>
</ul>
</div>
<div class="section" id="network-layer-improvements">
<h3>Network Layer Improvements<a class="headerlink" href="#network-layer-improvements" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>For the parameter <a class="reference internal" href="../reference/parameters.html#param.taskExecutorPoolSize" title="taskExecutorPoolSize"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">taskExecutorPoolSize</span></code></a>, change default
value to <code class="docutils literal"><span class="pre">1</span></code>.</li>
<li>Add new parameter <a class="reference external" href="https://docs.mongodb.com/v4.0/reference/parameters/#param.AsyncRequestsSenderUseBaton">AsyncRequestsSenderUseBaton</a> to enable
performance optimization on Linux for scatter/gather operations on
<a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> when using a single <a class="reference internal" href="../reference/parameters.html#param.taskExecutorPoolSize" title="taskExecutorPoolSize"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">Task</span> <span class="pre">Executor</span>
<span class="pre">connection</span> <span class="pre">pool</span></code></a>.</li>
<li>Added the following parameters to manage connection pools:<ul>
<li><a class="reference internal" href="../reference/parameters.html#param.connPoolMaxInUseConnsPerHost" title="connPoolMaxInUseConnsPerHost"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">connPoolMaxInUseConnsPerHost</span></code></a></li>
<li><a class="reference internal" href="../reference/parameters.html#param.connPoolMaxShardedInUseConnsPerHost" title="connPoolMaxShardedInUseConnsPerHost"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">connPoolMaxShardedInUseConnsPerHost</span></code></a></li>
<li><a class="reference internal" href="../reference/parameters.html#param.globalConnPoolIdleTimeoutMinutes" title="globalConnPoolIdleTimeoutMinutes"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">globalConnPoolIdleTimeoutMinutes</span></code></a></li>
<li><a class="reference internal" href="../reference/parameters.html#param.shardedConnPoolIdleTimeoutMinutes" title="shardedConnPoolIdleTimeoutMinutes"><code class="xref mongodb mongodb-parameter docutils literal"><span class="pre">shardedConnPoolIdleTimeoutMinutes</span></code></a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration-options">
<h3>Configuration Options<a class="headerlink" href="#configuration-options" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li><a class="reference internal" href="../reference/program/mongos.html#bin.mongos" title="bin.mongos"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongos</span></code></a> supports:<ul>
<li>Command line options: <a class="reference internal" href="../reference/program/mongos.html#cmdoption-mongos-slowms"><code class="xref std std-option docutils literal"><span class="pre">slowms</span></code></a> and
<a class="reference internal" href="../reference/program/mongos.html#cmdoption-mongos-slowopsamplerate"><code class="xref std std-option docutils literal"><span class="pre">--slowOpSampleRate</span></code></a></li>
<li>Configuration file options:
<a class="reference internal" href="../reference/configuration-options.html#operationProfiling.slowOpThresholdMs" title="operationProfiling.slowOpThresholdMs"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">operationProfiling.slowOpThresholdMs</span></code></a> and
<a class="reference internal" href="../reference/configuration-options.html#operationProfiling.slowOpSampleRate" title="operationProfiling.slowOpSampleRate"><code class="xref mongodb mongodb-setting docutils literal"><span class="pre">operationProfiling.slowOpSampleRate</span></code></a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="miscellaneous">
<h3>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Permalink to this headline">¶</a></h3>
<ul class="simple">
<li>The JavaScript engine’s JIT compiler is now disabled by default.</li>
<li>Upgrades MozJS to ESR 45.9.0.</li>
<li>Adds <a class="reference internal" href="../reference/log-messages.html#RECOVERY" title="RECOVERY"><code class="xref mongodb mongodb-data docutils literal"><span class="pre">RECOVERY</span></code></a> component to log messages.</li>
<li>MongoDB 4.0 adds support for using the <a class="reference internal" href="../reference/connection-string.html#urioption.appName" title="appName"><code class="xref mongodb mongodb-urioption docutils literal"><span class="pre">appName</span></code></a> connection
string option for setting a custom app name when connecting from the
<a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell. Previously, only MongoDB drivers supported
using the <a class="reference internal" href="../reference/connection-string.html#urioption.appName" title="appName"><code class="xref mongodb mongodb-urioption docutils literal"><span class="pre">appName</span></code></a> to set a custom value and the
<a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell used the default <code class="docutils literal"><span class="pre">MongoDB</span> <span class="pre">Shell</span></code> value as the
app name.</li>
<li>Adds a <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell method
<a class="reference internal" href="../reference/method/convertShardKeyToHashed.html#convertShardKeyToHashed" title="convertShardKeyToHashed"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">convertShardKeyToHashed</span></code></a> to return the hashed value for a
document.</li>
<li>Resolves <code class="docutils literal"><span class="pre">localhost</span></code> IP address as configured instead of assuming
<code class="docutils literal"><span class="pre">127.0.0.1</span></code>.</li>
<li>When using the <a class="reference internal" href="../reference/connection-string.html#connections-dns-seedlist"><span class="std std-ref">DNS Seedlist Connection Format</span></a> to connect to the
<a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell with authentication, the
<a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell will now prompt the user to
provide their password when starting up.</li>
</ul>
</div>
</div>
<div class="section" id="changes-affecting-compatibility">
<h2>Changes Affecting Compatibility<a class="headerlink" href="#changes-affecting-compatibility" title="Permalink to this headline">¶</a></h2>
<p>Some changes can affect compatibility and may require user actions. For
a detailed list of compatibility changes, see
<a class="reference internal" href="4.0-compatibility.html"><span class="doc">Compatibility Changes in MongoDB 4.0</span></a>.</p>
</div>
<div class="section" id="upgrade-procedures">
<span id="upgrade"></span><h2>Upgrade Procedures<a class="headerlink" href="#upgrade-procedures" title="Permalink to this headline">¶</a></h2>
<div class="admonition-feature-compatibility-version admonition">
<p class="first admonition-title">Feature Compatibility Version</p>
<p>To upgrade, the 3.6 instances must have
<code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> set to <code class="docutils literal"><span class="pre">3.6</span></code>. To check the version:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy</a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="nx">db</span><span class="p">.</span><span class="nx">adminCommand</span><span class="p">(</span> <span class="p">{</span> <span class="nx">getParameter</span><span class="o">:</span> <span class="mi">1</span><span class="p">,</span> <span class="nx">featureCompatibilityVersion</span><span class="o">:</span> <span class="mi">1</span> <span class="p">}</span> <span class="p">)</span>
</pre></div>
</div>
</div>
<p>For specific details on verifying and setting the
<code class="docutils literal"><span class="pre">featureCompatibilityVersion</span></code> as well as information on other
prerequisites/considerations for upgrades, refer to the individual
upgrade instructions:</p>
<ul class="last simple">
<li><a class="reference internal" href="4.0-upgrade-standalone.html"><span class="doc">Upgrade a Standalone to 4.0</span></a></li>
<li><a class="reference internal" href="4.0-upgrade-replica-set.html"><span class="doc">Upgrade a Replica Set to 4.0</span></a></li>
<li><a class="reference internal" href="4.0-upgrade-sharded-cluster.html"><span class="doc">Upgrade a Sharded Cluster to 4.0</span></a></li>
</ul>
</div>
<p>If you need guidance on upgrading to 4.0, <a class="reference external" href="https://www.mongodb.com/products/consulting?jmp=docs">MongoDB offers major version
upgrade services</a>
to help ensure a smooth transition without interruption to your MongoDB application.</p>
</div>
<div class="section" id="download">
<h2>Download<a class="headerlink" href="#download" title="Permalink to this headline">¶</a></h2>
<p>To download MongoDB 4.0, go to the <a class="reference external" href="https://www.mongodb.com/download-center/community?jmp=docs">MongoDB Download Center</a></p>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<ul class="last simple">
<li><a class="reference external" href="https://github.com/mongodb/mongo/blob/v4.0/distsrc/THIRD-PARTY-NOTICES">All Third Party License Notices</a>.</li>
</ul>
</div>
</div>
<div class="section" id="known-issues-in-4-0-3">
<span id="known-issues"></span><h2>Known Issues in 4.0.3<a class="headerlink" href="#known-issues-in-4-0-3" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/WT-4018">WT-4018</a>:</dt>
<dd>MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35431">SERVER-35431</a>:</dt>
<dd>After a rollback, the ‘dataSize’ field reported in
<a class="reference internal" href="../reference/command/collStats.html#dbcmd.collStats" title="collStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">collStats</span></code></a> and <a class="reference internal" href="../reference/command/dbStats.html#dbcmd.dbStats" title="dbStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">dbStats</span></code></a> output can be
inaccurate.</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="known-issues-in-4-0-2">
<span id="id27"></span><h2>Known Issues in 4.0.2<a class="headerlink" href="#known-issues-in-4-0-2" title="Permalink to this headline">¶</a></h2>
<ul>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/WT-4018">WT-4018</a>:</dt>
<dd><p class="first last">MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35431">SERVER-35431</a>:</dt>
<dd><p class="first last">After a rollback, the ‘dataSize’ field reported in
<a class="reference internal" href="../reference/command/collStats.html#dbcmd.collStats" title="collStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">collStats</span></code></a> and <a class="reference internal" href="../reference/command/dbStats.html#dbcmd.dbStats" title="dbStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">dbStats</span></code></a> output can be
inaccurate.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35657">SERVER-35657</a>:</dt>
<dd><p class="first">Using multi-document transactions with a single-member replica set
may have significant performance impact. Single-member replica sets
should only be for testing/development purposes and are not
recommended for production use.</p>
<div class="last admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Multi-document transactions performance on a single-member
replica set are not indicative of performance on a replica set
with more than one member.</p>
</div>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="known-issues-in-4-0-1">
<span id="id28"></span><h2>Known Issues in 4.0.1<a class="headerlink" href="#known-issues-in-4-0-1" title="Permalink to this headline">¶</a></h2>
<ul>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/WT-4018">WT-4018</a>:</dt>
<dd><p class="first last">MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35431">SERVER-35431</a>:</dt>
<dd><p class="first last">After a rollback, the ‘dataSize’ field reported in
<a class="reference internal" href="../reference/command/collStats.html#dbcmd.collStats" title="collStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">collStats</span></code></a> and <a class="reference internal" href="../reference/command/dbStats.html#dbcmd.dbStats" title="dbStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">dbStats</span></code></a> output can be
inaccurate.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35657">SERVER-35657</a>:</dt>
<dd><p class="first">Using multi-document transactions with a single-member replica set
may have significant performance impact. Single-member replica sets
should only be for testing/development purposes and are not
recommended for production use.</p>
<div class="last admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Multi-document transactions performance on a single-member
replica set are not indicative of performance on a replica set
with more than one member.</p>
</div>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="known-issues-in-4-0-0">
<span id="id29"></span><h2>Known Issues in 4.0.0<a class="headerlink" href="#known-issues-in-4-0-0" title="Permalink to this headline">¶</a></h2>
<ul>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/TOOLS-1952">TOOLS-1952</a>:</dt>
<dd><p class="first last">Users running MongoDB 4.0 <a class="reference internal" href="../reference/program/mongodump.html#bin.mongodump" title="bin.mongodump"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongodump</span></code></a> may experience
slower performance compared to previous versions. Running
<a class="reference internal" href="../reference/program/mongodump.html#bin.mongodump" title="bin.mongodump"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongodump</span></code></a> with
<a class="reference internal" href="../reference/program/mongodump.html#cmdoption-mongodump-forcetablescan"><code class="xref std std-option docutils literal"><span class="pre">--forceTableScan</span></code></a> may
resolve performance issues.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/TOOLS-2058">TOOLS-2058</a>:</dt>
<dd><p class="first"><a class="reference internal" href="../reference/program/mongoreplay.html#bin.mongoreplay" title="bin.mongoreplay"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongoreplay</span></code></a>  does not show insert/find commands for MongoDB 4.0.</p>
<p class="last"># Fixed in 4.0.1</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/WT-4018">WT-4018</a>:</dt>
<dd><p class="first last">MongoDB 4.0 may lose data during unclean shutdowns on macOS 10.12.x and 10.13.x.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35431">SERVER-35431</a>:</dt>
<dd><p class="first last">After a rollback, the ‘dataSize’ field reported in
<a class="reference internal" href="../reference/command/collStats.html#dbcmd.collStats" title="collStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">collStats</span></code></a> and <a class="reference internal" href="../reference/command/dbStats.html#dbcmd.dbStats" title="dbStats"><code class="xref mongodb mongodb-dbcommand docutils literal"><span class="pre">dbStats</span></code></a> output can be
inaccurate.</p>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35657">SERVER-35657</a>:</dt>
<dd><p class="first">Using multi-document transactions with a single-member replica set
may have significant performance impact. Single-member replica sets
should only be for testing/development purposes and are not
recommended for production use.</p>
<div class="last admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Multi-document transactions performance on a single-member
replica set are not indicative of performance on a replica set
with more than one member.</p>
</div>
</dd>
</dl>
</li>
<li><dl class="first docutils">
<dt><a class="reference external" href="https://jira.mongodb.org/browse/SERVER-35758">SERVER-35758</a>:</dt>
<dd><p class="first">The shell prompt in the <a class="reference internal" href="../reference/program/mongo.html#bin.mongo" title="bin.mongo"><code class="xref mongodb mongodb-binary docutils literal"><span class="pre">mongo</span></code></a> shell will cause an
error if you use the session associated with the global <code class="docutils literal"><span class="pre">db</span></code>
object to run transactions.</p>
<p class="last"># Fixed in 4.0.1</p>
</dd>
</dl>
</li>
</ul>
</div>
<div class="section" id="report-an-issue">
<h2>Report an Issue<a class="headerlink" href="#report-an-issue" title="Permalink to this headline">¶</a></h2>
<p>To report an issue, see
<a class="reference external" href="https://github.com/mongodb/mongo/wiki/Submit-Bug-Reports">https://github.com/mongodb/mongo/wiki/Submit-Bug-Reports</a> for
instructions on how to file a JIRA ticket for the MongoDB server or one
of the related projects.</p>
<div class="toctree-wrapper hidden compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="4.0-compatibility.html">Compatibility Changes in MongoDB 4.0</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#remove-support-for-mongodb-cr">Remove Support for <code class="docutils literal"><span class="pre">MONGODB-CR</span></code></a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#removal-of-authschemaupgrade-command">Removal of <code class="docutils literal"><span class="pre">authSchemaUpgrade</span></code> Command</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#remove-mongodb-cr-support-from-db-copydatabase-and-copydb">Remove <code class="docutils literal"><span class="pre">MONGODB-CR</span></code> Support from <code class="docutils literal"><span class="pre">db.copyDatabase()</span></code> and <code class="docutils literal"><span class="pre">copydb</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#deprecate-mmapv1">Deprecate MMAPv1</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#x-509-authentication-certificate-restrictions">x.509 Authentication Certificate Restrictions</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#replica-sets">Replica Sets</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#remove-pv0-for-replica-sets">Remove <code class="docutils literal"><span class="pre">pv0</span></code> for Replica Sets</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#remove-master-slave-replication">Remove Master-Slave Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#journaling-and-replica-sets">Journaling and Replica Sets</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#index-builds-and-replica-sets">Index Builds and Replica Sets</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#rollback-limit">Rollback Limit</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#sharded-clusters">Sharded Clusters</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#feature-compatibility"><code class="docutils literal"><span class="pre">4.0</span></code> Feature Compatibility</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#general">General</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#cursor-min-and-cursor-max"><code class="docutils literal"><span class="pre">cursor.min()</span></code> and <code class="docutils literal"><span class="pre">cursor.max()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#disable-tls-1-0">Disable TLS 1.0</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#aes-gcm">AES-GCM</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#mongo-shell"><code class="docutils literal"><span class="pre">mongo</span></code> Shell</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#show-collections"><code class="docutils literal"><span class="pre">show</span> <span class="pre">collections</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#db-getcollectionnames"><code class="docutils literal"><span class="pre">db.getCollectionNames()</span></code></a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-compatibility.html#removed-binary-and-deprecated-fields-commands">Removed Binary and Deprecated Fields/Commands</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#mongoperf"><code class="docutils literal"><span class="pre">mongoperf</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#copydb-and-clone-commands"><code class="docutils literal"><span class="pre">copydb</span></code> and <code class="docutils literal"><span class="pre">clone</span></code> Commands</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#parameters">Parameters</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#isolated-operator"><code class="docutils literal"><span class="pre">$isolated</span></code> Operator</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#geonear-command"><code class="docutils literal"><span class="pre">geoNear</span></code> Command</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#maxscan-option"><code class="docutils literal"><span class="pre">maxScan</span></code> Option</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-compatibility.html#output-field-changes">Output Field Changes</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4.0-upgrade-standalone.html">Upgrade a Standalone to 4.0</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-standalone.html#upgrade-recommendations-and-checklists">Upgrade Recommendations and Checklists</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#upgrade-version-path">Upgrade Version Path</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#preparedness">Preparedness</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#downgrade-consideration">Downgrade Consideration</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-standalone.html#prerequisites">Prerequisites</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#remove-support-for-mongodb-cr">Remove Support for <code class="docutils literal"><span class="pre">MONGODB-CR</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#remove-support-for-isolated">Remove Support for <code class="docutils literal"><span class="pre">$isolated</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#feature-compatibility-version">Feature Compatibility Version</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-standalone.html#download-newversion-binaries">Download 4.0 Binaries</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#via-package-manager">Via Package Manager</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#manually">Manually</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-standalone.html#upgrade-process">Upgrade Process</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#replace-existing-oldversion-binaries-with-the-newversion-binaries">Replace existing 3.6 binaries with the 4.0 binaries.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-standalone.html#enable-backwards-incompatible-newversion-features">Enable backwards-incompatible 4.0 features.</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-standalone.html#additional-upgrade-procedures">Additional Upgrade Procedures</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4.0-upgrade-replica-set.html">Upgrade a Replica Set to 4.0</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-replica-set.html#upgrade-recommendations-and-checklists">Upgrade Recommendations and Checklists</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#upgrade-version-path">Upgrade Version Path</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#preparedness">Preparedness</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#downgrade-consideration">Downgrade Consideration</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#initial-syncs">Initial Syncs</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#default-bind-to-localhost">Default Bind to Localhost</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#read-concern-majority-3-member-primary-secondary-arbiter-architecture">Read Concern Majority (3-Member Primary-Secondary-Arbiter Architecture)</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#change-streams-resume-tokens">Change Streams Resume Tokens</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-replica-set.html#prerequisites">Prerequisites</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#all-members-version">All Members Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#remove-support-for-mongodb-cr">Remove Support for <code class="docutils literal"><span class="pre">MONGODB-CR</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#remove-pv0-for-replica-sets">Remove <code class="docutils literal"><span class="pre">pv0</span></code> for Replica Sets</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#remove-master-slave-replication">Remove Master-Slave Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#remove-support-for-isolated">Remove Support for <code class="docutils literal"><span class="pre">$isolated</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#feature-compatibility-version">Feature Compatibility Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#replica-set-member-state">Replica Set Member State</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-replica-set.html#download-newversion-binaries">Download 4.0 Binaries</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#via-package-manager">Via Package Manager</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#manually">Manually</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-replica-set.html#upgrade-process">Upgrade Process</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#upgrade-secondary-members-of-the-replica-set">Upgrade secondary members of the replica set.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#step-down-the-replica-set-primary">Step down the replica set primary.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#upgrade-the-primary">Upgrade the primary.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-replica-set.html#enable-backwards-incompatible-newversion-features">Enable backwards-incompatible 4.0 features.</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-replica-set.html#additional-upgrade-procedures">Additional Upgrade Procedures</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html">Upgrade a Sharded Cluster to 4.0</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#upgrade-recommendations-and-checklists">Upgrade Recommendations and Checklists</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#upgrade-version-path">Upgrade Version Path</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#preparedness">Preparedness</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#downgrade-consideration">Downgrade Consideration</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#default-bind-to-localhost">Default Bind to Localhost</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#read-concern-majority-3-member-primary-secondary-arbiter-architecture">Read Concern Majority (3-Member Primary-Secondary-Arbiter Architecture)</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#change-streams-resume-tokens">Change Streams Resume Tokens</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#prerequisites">Prerequisites</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#all-members-version">All Members Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#replica-set-member-state">Replica Set Member State</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#remove-support-for-mongodb-cr">Remove Support for <code class="docutils literal"><span class="pre">MONGODB-CR</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#remove-pv0-for-replica-sets">Remove <code class="docutils literal"><span class="pre">pv0</span></code> for Replica Sets</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#remove-master-slave-replication">Remove Master-Slave Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#remove-support-for-isolated">Remove Support for <code class="docutils literal"><span class="pre">$isolated</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#feature-compatibility-version">Feature Compatibility Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#back-up-the-config-database">Back up the <code class="docutils literal"><span class="pre">config</span></code> Database</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#download-newversion-binaries">Download 4.0 Binaries</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#use-package-manager">Use Package Manager</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#download-newversion-binaries-manually">Download 4.0 Binaries Manually</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#upgrade-process">Upgrade Process</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#disable-the-balancer">Disable the Balancer.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#upgrade-the-config-servers">Upgrade the config servers.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#upgrade-the-shards">Upgrade the shards.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#upgrade-the-mongos-instances">Upgrade the <code class="docutils literal"><span class="pre">mongos</span></code> instances.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#re-enable-the-balancer">Re-enable the balancer.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#enable-backwards-incompatible-newversion-features">Enable backwards-incompatible 4.0 features.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#restart-mongos-instances">Restart <code class="docutils literal"><span class="pre">mongos</span></code> instances.</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-upgrade-sharded-cluster.html#additional-upgrade-procedures">Additional Upgrade Procedures</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4.0-downgrade-standalone.html">Downgrade 4.0 Standalone to 3.6</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-standalone.html#downgrade-path">Downgrade Path</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-standalone.html#create-backup">Create Backup</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-standalone.html#prerequisites">Prerequisites</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-standalone.html#downgrade-feature-compatibility-version">1. Downgrade Feature Compatibility Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-standalone.html#remove-backwards-incompatible-persisted-features">2. Remove Backwards Incompatible Persisted Features</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-standalone.html#procedure">Procedure</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-standalone.html#download-the-latest-oldversion-binaries">Download the latest 3.6 binaries.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-standalone.html#restart-with-the-latest-oldversion-mongod-instance">Restart with the latest 3.6 <code class="docutils literal"><span class="pre">mongod</span></code> instance.</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4.0-downgrade-replica-set.html">Downgrade 4.0 Replica Set to 3.6</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-replica-set.html#downgrade-path">Downgrade Path</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html#change-stream-consideration">Change Stream Consideration</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-replica-set.html#create-backup">Create Backup</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-replica-set.html#prerequisites">Prerequisites</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html#downgrade-feature-compatibility-version">1. Downgrade Feature Compatibility Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html#remove-backwards-incompatible-persisted-features">2. Remove Backwards Incompatible Persisted Features</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-replica-set.html#procedure">Procedure</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html#download-the-latest-oldversion-binaries">Download the latest 3.6 binaries.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html#downgrade-secondary-members-of-the-replica-set">Downgrade secondary members of the replica set.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html#step-down-the-primary">Step down the primary.</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-replica-set.html#replace-and-restart-former-primary-mongod">Replace and restart former primary <code class="docutils literal"><span class="pre">mongod</span></code>.</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html">Downgrade 4.0 Sharded Cluster to 3.6</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#downgrade-path">Downgrade Path</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#change-stream-consideration">Change Stream Consideration</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#create-backup">Create Backup</a></li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#prerequisites">Prerequisites</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#downgrade-feature-compatibility-version">1. Downgrade Feature Compatibility Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#remove-backwards-incompatible-persisted-features">2. Remove Backwards Incompatible Persisted Features</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#procedure">Procedure</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#downgrade-a-sharded-cluster">Downgrade a Sharded Cluster</a><ul>
<li class="toctree-l4"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#download-the-latest-oldversion-binaries">Download the latest 3.6 binaries.</a></li>
<li class="toctree-l4"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#disable-the-balancer">Disable the Balancer.</a></li>
<li class="toctree-l4"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#downgrade-the-mongos-instances">Downgrade the <code class="docutils literal"><span class="pre">mongos</span></code> instances.</a></li>
<li class="toctree-l4"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#downgrade-each-shard-one-at-a-time">Downgrade each shard, one at a time.</a></li>
<li class="toctree-l4"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#downgrade-the-config-servers">Downgrade the config servers.</a></li>
<li class="toctree-l4"><a class="reference internal" href="4.0-downgrade-sharded-cluster.html#re-enable-the-balancer">Re-enable the balancer.</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="4.0-changelog.html">4.0 Changelog</a><ul>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id1">4.0.18 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#security">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#sharding">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#replication">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#query">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#operations">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#build-and-packaging">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#internals">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id3">4.0.17 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id5">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id6">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id7">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#aggregation">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id8">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id9">4.0.16 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id11">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id12">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id13">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#storage">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id14">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id15">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id16">4.0.15 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id18">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id19">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id20">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id21">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id22">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id23">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id24">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id25">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id26">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id27">4.0.14 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id29">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id30">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id31">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id32">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id33">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id34">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id35">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id36">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id37">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id38">4.0.13 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id40">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id41">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id42">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id43">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id44">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id45">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id46">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id47">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id48">4.0.12 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id50">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id51">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id52">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id53">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id54">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id55">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id56">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id57">4.0.11 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id59">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id60">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id61">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id62">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id63">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id64">Storage</a><ul>
<li class="toctree-l4"><a class="reference internal" href="4.0-changelog.html#wiredtiger">WiredTiger</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id65">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id66">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id67">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id68">4.0.10 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id70">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id71">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id72">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id73">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id74">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id75">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id76">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id77">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id78">4.0.9 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id80">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id81">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id82">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id83">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id84">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id85">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id86">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id87">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id88">4.0.8 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id90">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id91">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id92">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id93">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id94">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id95">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id96">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#tools">Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id97">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id98">4.0.7 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id100">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id101">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id102">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id103">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id104">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#javascript">JavaScript</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id105">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id106">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id107">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id108">Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id109">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id110">4.0.6 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id112">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id113">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id114">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id115">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#write-operations">Write Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id116">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id117">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id118">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id119">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id120">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id121">4.0.5 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id123">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id124">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id125">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id126">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id127">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id128">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id129">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id130">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id131">Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id132">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id133">4.0.4 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id135">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id136">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id137">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id138">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id139">JavaScript</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id140">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id141">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id142">Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id143">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id144">4.0.3 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id146">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id147">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id148">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id149">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id150">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id151">Storage</a><ul>
<li class="toctree-l4"><a class="reference internal" href="4.0-changelog.html#id152">WiredTiger</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id153">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id154">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id155">Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id156">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id157">4.0.2 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id159">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id160">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id161">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id162">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id163">JavaScript</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id164">Storage</a><ul>
<li class="toctree-l4"><a class="reference internal" href="4.0-changelog.html#id165">WiredTiger</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id166">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id167">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id168">Internals</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="4.0-changelog.html#id169">4.0.1 Changelog</a><ul>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id171">Security</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id172">Sharding</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id173">Replication</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id174">Query</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id175">Aggregation</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#catalog">Catalog</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id176">Storage</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#gridfs">GridFS</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id177">Operations</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id178">Build and Packaging</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id179">Tools</a></li>
<li class="toctree-l3"><a class="reference internal" href="4.0-changelog.html#id180">Internals</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>

                
    <div id="btnv">
      <span class="btn-arrow-left">&larr; &nbsp;</span>
      <a class="btn-prev-text" href="4.2-changelog.html" title="Previous Section: 4.2 Changelog"><span>4.2 Changelog</span></a>
      <a class="btn-next-text" href="4.0-compatibility.html" title="Next Section: Compatibility Changes in MongoDB 4.0"><span>Compatibility Changes in MongoDB 4.0</span></a>
      <span class="btn-arrow-right">&nbsp;&rarr;</span>
    </div>
                  <div class="footer">
                    <div class="copyright">
                      <p>&copy; MongoDB, Inc 2008-present. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc.</p>
                    </div>
                  </div>
              </div></div>
            </div>
        </div>
    </div>
    <div class="right-column">
      <div class="wrapper"> <div id='mongodb-docs-1'>
   <script type='text/javascript'>
      googletag.cmd.push(function() { googletag.display('mongodb-docs-1'); });
   </script>
</div>
            <div class="social">
               <a class="slack-icon" href="https://slackpass.io/mongo-db?jmp=docs" title="https://slackpass.io/mongo-db?jmp=docs"><i class="fab fa-slack" aria-hidden="true"></i></a>
               <a class="twitter-icon" href="https://twitter.com/MongoDB" title="https://twitter.com/MongoDB"><i class="fab fa-twitter-square"></i></a>
               <a class="youtube-icon" href="https://www.youtube.com/user/MongoDB" title="https://www.youtube.com/user/MongoDB"><i class="fab fa-youtube-square"></i></a>
               <a class="facebook-icon" href="https://www.facebook.com/mongodb" title="https://www.facebook.com/mongodb"><i class="fab fa-facebook-square"></i></a>
               <a class="stack-overflow-icon" href="https://stackoverflow.com/tags/mongodb/info" title="https://stackoverflow.com/tags/mongodb/info"><i class="fab fa-stack-overflow" aria-hidden="true"></i></a>
            </div>
        

      </div>
    </div>
    
      <div id="rating-panel"></div>
    
    <div class="clearfix"></div>
  </div>
  

  <script type="text/javascript">
  // Bootstrap array of links that should trigger a full page reload
  window.docsExcludedNav = ['/administration', '/administration/production-checklist', '/administration/indexes-management', '/aggregation', '/applications/geospatial-indexes', '/applications/indexes', '/contributors/getting-started', '/core/2d', '/core/2dsphere', '/core/auditing', '/core/authentication', '/core/authorization', '/core/backups', '/core/read-isolation-consistency-recency', '/core/databases-and-collections', '/core/geohaystack', '/core/index-single', '/core/index-compound', '/core/index-creation', '/core/index-hashed', '/core/index-multikey', '/core/index-partial', '/core/index-sparse', '/core/index-text', '/core/index-ttl', '/core/index-unique', '/core/index-wildcard', '/core/journaling', '/core/kerberos', '/core/map-reduce', '/core/operational-segregation', '/core/query-optimization', '/core/read-preference', '/core/replica-set-architectures', '/core/replica-set-high-availability', '/core/replica-set-members', '/core/replica-set-secondary', '/core/transactions', '/geospatial-queries', '/replication', '/core/sharded-cluster-components', '/core/wiredtiger', '/core/write-operations-atomicity', '/crud', '/indexes', '/installation', '/introduction', '/mongo', '/products/bi-connector', '/reference/command', '/reference/collation', '/text-search', '/tutorial/manage-the-database-profiler', '/core/index-text', '/reference/bson-types', '/reference/configuration-options', '/reference/indexes', '/reference/method', '/reference/operator/aggregation', '/reference/operator/query', '/reference/operator/query-modifier', '/reference/operator/update', '/reference/replication', '/reference/read-concern', '/reference/security', '/reference/sharding', '/reference/write-concern', '/release-notes/2.4', '/release-notes/2.6', '/release-notes/2.8', '/release-notes/3.0', '/release-notes/3.2', '/release-notes/3.4', '/release-notes/3.6', '/release-notes/4.0', '/release-notes/4.2', '/security', '/sharding', '/changeStreams', '/core/zone-sharding', '/core/hashed-sharding', '/core/ranged-sharding', '/storage', '/tutorial/change-sharded-cluster-wiredtiger', '/tutorial/insert-documents', '/tutorial/query-documents', '/tutorial/remove-documents', '/tutorial/update-documents', '/tutorial/enable-authentication', '/tutorial/install-mongodb-on-ubuntu', '/tutorial/install-mongodb-on-windows', '/tutorial/install-mongodb-on-red-hat', '/tutorial/install-mongodb-on-debian', '/tutorial/install-mongodb-on-suse', '/tutorial/install-mongodb-on-amazon', '/tutorial/install-mongodb-enterprise-on-ubuntu', '/tutorial/install-mongodb-enterprise-on-windows', '/tutorial/install-mongodb-enterprise-on-red-hat', '/tutorial/install-mongodb-enterprise-on-debian', '/tutorial/install-mongodb-enterprise-on-suse', '/tutorial/install-mongodb-enterprise-on-amazon', '/tutorial/install-mongodb-on-os-x'];
  </script></body>
</html>